Fix custom_cni manifest apply failure for multi-namespace resources (#13091)

* 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>
This commit is contained in:
Kay Yan
2026-09-02 09:38:20 +00:00
committed by GitHub
parent 9ee6f9b279
commit 990d3035a1
5 changed files with 23 additions and 1 deletions
@@ -9,10 +9,16 @@
## List of Kubernetes resource manifest files
## See tests/files/custom_cni/README.md for example
# custom_cni_manifests: []
#
## Namespace passed to kubectl when applying manifests.
## Set to an empty string for multi-namespace manifests where every namespaced
## resource declares metadata.namespace.
# custom_cni_namespace: "kube-system"
## OPTION 1 EXAMPLE - Cilium static manifests in Kubespray tree
# custom_cni_manifests:
# - "{{ playbook_dir }}/../tests/files/custom_cni/cilium.yaml"
# custom_cni_namespace: ""
## OPTION 2 - Helm chart application
## This allows the CNI backend to be deployed to Kubespray cluster