mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-31 22:46:19 -02:30
* fix(custom_cni): make namespace optional Keep kube-system as the default for existing manifests. An empty custom_cni_namespace omits kubectl's namespace flag so manifests spanning multiple namespaces can be applied without changing legacy behavior. Signed-off-by: Kay Yan <kay.yan@daocloud.io> * docs(custom_cni): document multi-namespace manifests Signed-off-by: Kay Yan <kay.yan@daocloud.io> --------- Signed-off-by: Kay Yan <kay.yan@daocloud.io>
26 lines
843 B
Markdown
26 lines
843 B
Markdown
# Custom CNI manifest generation
|
|
|
|
As an example we are using Cilium for testing the network_plugins/custom_cni.
|
|
|
|
To update the generated manifests to the latest version do the following:
|
|
|
|
```sh
|
|
helm repo add cilium https://helm.cilium.io/
|
|
helm repo update
|
|
helm template cilium/cilium -n kube-system -f values.yaml > cilium.yaml
|
|
```
|
|
|
|
The generated Cilium manifest contains resources in both the `kube-system` and
|
|
`cilium-secrets` namespaces. Configure the static manifest example without a
|
|
kubectl namespace argument:
|
|
|
|
```yaml
|
|
custom_cni_manifests:
|
|
- "{{ playbook_dir }}/../tests/files/custom_cni/cilium.yaml"
|
|
custom_cni_namespace: ""
|
|
```
|
|
|
|
When `custom_cni_namespace` is empty, every namespaced resource in the
|
|
manifests should declare `metadata.namespace`. Otherwise, kubectl applies the
|
|
resource to the current context's default namespace.
|