Skip to content

Commit 4c76feb

Browse files
authored
Kubelet csr approver fixes (#10165)
* Fix upgrade-path for kubelet-csr-approver Fixes an error when you enable kubelet-csr-approver when upgrading. It hangs waiting for the certificate to be approved since the kubelet-csr-approver is not installed yet. * Add missing package when using helm role
1 parent 18d84db commit 4c76feb

File tree

11 files changed

+38
-1
lines changed

11 files changed

+38
-1
lines changed

playbooks/upgrade_cluster.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
roles:
8585
- { role: kubespray-defaults }
8686
- { role: upgrade/pre-upgrade, tags: pre-upgrade }
87+
- { role: kubernetes-apps/kubelet-csr-approver, tags: kubelet-csr-approver }
8788
- { role: container-engine, tags: "container-engine", when: deploy_container_engine }
8889
- { role: kubernetes/node, tags: node }
8990
- { role: kubernetes/control-plane, tags: master, upgrade_cluster_setup: true }
@@ -104,7 +105,6 @@
104105
- { role: kubernetes-apps/external_cloud_controller, tags: external-cloud-controller }
105106
- { role: network_plugin, tags: network }
106107
- { role: kubernetes-apps/network_plugin, tags: network }
107-
- { role: kubernetes-apps/kubelet-csr-approver, tags: kubelet-csr-approver }
108108
- { role: kubernetes-apps/policy_controller, tags: policy-controller }
109109

110110
- name: Finally handle worker upgrades, based on given batch size

roles/kubernetes-apps/helm/tasks/main.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
---
2+
- name: Helm | Gather os specific variables
3+
include_vars: "{{ item }}"
4+
with_first_found:
5+
- files:
6+
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
7+
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
8+
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
9+
- "{{ ansible_distribution|lower }}.yml"
10+
- "{{ ansible_os_family|lower }}.yml"
11+
- defaults.yml
12+
paths:
13+
- ../vars
14+
skip: true
15+
16+
- name: Helm | Install PyYaml
17+
package:
18+
name: "{{ pyyaml_package }}"
19+
state: present
20+
221
- name: Helm | Download helm
322
include_tasks: "../../../download/tasks/download_file.yml"
423
vars:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pyyaml_package: PyYAML
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pyyaml_package: python3-pyyaml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pyyaml_package: PyYAML
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pyyaml_package: python3-yaml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pyyaml_package: python3-pyyaml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pyyaml_package: python3-pyyaml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pyyaml_package: PyYAML
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pyyaml_package: PyYAML
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
pyyaml_package: python3-yaml

0 commit comments

Comments
 (0)