From e8bdd47eccb35dee145e92e251512f2f55d060f3 Mon Sep 17 00:00:00 2001 From: Javad <46030348+M-JavadHeydarpour@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:24:54 +0330 Subject: [PATCH] Fix kubelet-csr-approver deployment failes if kube_network_plugin=cni(generic) (#11704) * Make Helm's 'atomic' parameter configurable from role variables * Configure Helm with 'atomic' and 'wait' set to false for generic CNI to prevent kubelet-csr-approver installation failures --- roles/helm-apps/meta/argument_specs.yml | 6 ++++++ roles/kubernetes-apps/kubelet-csr-approver/meta/main.yml | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/helm-apps/meta/argument_specs.yml b/roles/helm-apps/meta/argument_specs.yml index d1be9a815..0ec83bb3f 100644 --- a/roles/helm-apps/meta/argument_specs.yml +++ b/roles/helm-apps/meta/argument_specs.yml @@ -46,6 +46,9 @@ argument_specs: default: true wait_timeout: type: str + atomic: + type: bool + default: true repositories: type: list @@ -91,3 +94,6 @@ argument_specs: wait_timeout: type: str default: "5m" + atomic: + type: bool + default: true diff --git a/roles/kubernetes-apps/kubelet-csr-approver/meta/main.yml b/roles/kubernetes-apps/kubelet-csr-approver/meta/main.yml index 93d13830c..56f7e7157 100644 --- a/roles/kubernetes-apps/kubelet-csr-approver/meta/main.yml +++ b/roles/kubernetes-apps/kubelet-csr-approver/meta/main.yml @@ -13,7 +13,8 @@ dependencies: namespace: "{{ kubelet_csr_approver_namespace }}" chart_ref: "{{ kubelet_csr_approver_chart_ref }}" chart_version: "{{ kubelet_csr_approver_chart_version }}" - wait: true + wait: "{{ kube_network_plugin != 'cni' }}" + atomic: "{{ kube_network_plugin != 'cni' }}" values: "{{ kubelet_csr_approver_values }}" repositories: - name: "{{ kubelet_csr_approver_repository_name }}"