From 971e5f561b7b3732954fd92e9da324bf99f00eaa Mon Sep 17 00:00:00 2001 From: Ali Soltaninasab Date: Wed, 15 Jul 2026 07:35:20 +0330 Subject: [PATCH] Support authentication for custom CNI Helm repositories (#13294) * Add authentication support for custom CNI Helm repository Pass optional Helm repository username and password values to the custom CNI chart configuration. These values use default(omit) so authentication fields are only included when explicitly defined by the user. * Document custom CNI Helm repository authentication variables Add commented sample variables for configuring a username and password when the custom CNI Helm repository requires authentication. * Address Copilot documentation feedback Document paired repository credentials and secure password storage. Remove authentication placeholders from the public Cilium example. --- .../sample/group_vars/k8s_cluster/k8s-net-custom-cni.yml | 8 ++++++++ roles/network_plugin/custom_cni/meta/main.yml | 2 ++ 2 files changed, 10 insertions(+) diff --git a/inventory/sample/group_vars/k8s_cluster/k8s-net-custom-cni.yml b/inventory/sample/group_vars/k8s_cluster/k8s-net-custom-cni.yml index 8850210c4..3338f4460 100644 --- a/inventory/sample/group_vars/k8s_cluster/k8s-net-custom-cni.yml +++ b/inventory/sample/group_vars/k8s_cluster/k8s-net-custom-cni.yml @@ -30,6 +30,14 @@ ## Helm repository URL # custom_cni_chart_repository_url: "" # +## Helm repository username, if authentication is required +## Username and password must be defined together +# custom_cni_chart_repository_username: "" +# +## Helm repository password, if authentication is required +## Store sensitive values securely, for example using Ansible Vault +# custom_cni_chart_repository_password: "" +# ## Helm chart reference - path to the chart in the repository # custom_cni_chart_ref: "" # diff --git a/roles/network_plugin/custom_cni/meta/main.yml b/roles/network_plugin/custom_cni/meta/main.yml index 4e48c34ad..6856aa993 100644 --- a/roles/network_plugin/custom_cni/meta/main.yml +++ b/roles/network_plugin/custom_cni/meta/main.yml @@ -17,3 +17,5 @@ dependencies: repositories: - name: "{{ custom_cni_chart_repository_name }}" url: "{{ custom_cni_chart_repository_url }}" + username: "{{ custom_cni_chart_repository_username | default(omit) }}" + password: "{{ custom_cni_chart_repository_password | default(omit) }}"