Skip to content

Commit

Permalink
Ensure we always fixup kube-proxy kubeconfig (#5524) (#5559)
Browse files Browse the repository at this point in the history
When running with serial != 100%, like upgrade_cluster.yml, we need to apply this fixup each time
Problem was introduced in 05dc2b3

Signed-off-by: Etienne Champetier <[email protected]>
(cherry picked from commit 5e9479c)
  • Loading branch information
champtar authored Mar 19, 2020
1 parent b0ccda8 commit abe9b40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions roles/kubernetes/kubeadm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
| sed 's#server:.*#server:\ {{ kube_apiserver_endpoint }}#g'
| {{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf replace -f -
run_once: true
delegate_to: "{{ groups['kube-master']|first }}"
when:
- inventory_hostname == groups['kube-master']|first
- kubeadm_config_api_fqdn is not defined
- kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
- not kube_proxy_remove
Expand All @@ -121,8 +121,8 @@
- name: Restart all kube-proxy pods to ensure that they load the new configmap
shell: "{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf delete pod -n kube-system -l k8s-app=kube-proxy --force --grace-period=0"
run_once: true
delegate_to: "{{ groups['kube-master']|first }}"
when:
- inventory_hostname == groups['kube-master']|first
- kubeadm_config_api_fqdn is not defined
- kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
- not kube_proxy_remove
Expand All @@ -145,8 +145,8 @@
- name: Delete kube-proxy daemonset if kube_proxy_remove set, e.g. kube_network_plugin providing proxy services
shell: "{{ bin_dir }}/kubectl --kubeconfig /etc/kubernetes/admin.conf delete daemonset -n kube-system kube-proxy"
run_once: true
delegate_to: "{{ groups['kube-master']|first }}"
when:
- inventory_hostname == groups['kube-master']|first
- kube_proxy_remove
- kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
tags:
Expand Down

0 comments on commit abe9b40

Please sign in to comment.