Only fix kube-proxy address on evaluating kube_master hosts (#6152)
Change-Id: I83a7101a6cd99eb531d8385de5c31aee4f474469
This commit is contained in:
parent
3997aa9a0f
commit
fda05df5f1
1 changed files with 4 additions and 0 deletions
|
@ -111,7 +111,9 @@
|
|||
| {{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf replace -f -
|
||||
run_once: true
|
||||
delegate_to: "{{ groups['kube-master']|first }}"
|
||||
delegate_facts: false
|
||||
when:
|
||||
- inventory_hostname in groups['kube-master']
|
||||
- kubeadm_config_api_fqdn is not defined
|
||||
- kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
|
||||
- not kube_proxy_remove
|
||||
|
@ -130,7 +132,9 @@
|
|||
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 }}"
|
||||
delegate_facts: false
|
||||
when:
|
||||
- inventory_hostname in groups['kube-master']
|
||||
- kubeadm_config_api_fqdn is not defined
|
||||
- kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
|
||||
- not kube_proxy_remove
|
||||
|
|
Loading…
Reference in a new issue