Fix scale.yml to supoort kubeadm (#1863)
Signed-off-by: Haiwei Liu <carllhw@gmail.com>
This commit is contained in:
parent
cea41a544e
commit
cfea99c4ee
3 changed files with 9 additions and 1 deletions
5
roles/kubernetes/kubeadm/handler/main.yml
Normal file
5
roles/kubernetes/kubeadm/handler/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: restart kubelet
|
||||||
|
service:
|
||||||
|
name: kubelet
|
||||||
|
state: restarted
|
|
@ -38,10 +38,11 @@
|
||||||
- name: Update server field in kubelet kubeconfig
|
- name: Update server field in kubelet kubeconfig
|
||||||
replace:
|
replace:
|
||||||
path: "{{ kube_config_dir }}/kubelet.conf"
|
path: "{{ kube_config_dir }}/kubelet.conf"
|
||||||
regexp: '(\s+){{ first_kube_master }}:{{ kube_apiserver_port }}(\s+.*)?$'
|
regexp: '(\s+)https://{{ first_kube_master }}:{{ kube_apiserver_port }}(\s+.*)?$'
|
||||||
replace: '\1{{ kube_apiserver_endpoint }}\2'
|
replace: '\1{{ kube_apiserver_endpoint }}\2'
|
||||||
backup: yes
|
backup: yes
|
||||||
when: not is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint
|
when: not is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint
|
||||||
|
notify: restart kubelet
|
||||||
|
|
||||||
# FIXME(mattymo): Reconcile kubelet kubeconfig filename for both deploy modes
|
# FIXME(mattymo): Reconcile kubelet kubeconfig filename for both deploy modes
|
||||||
- name: Symlink kubelet kubeconfig for calico/canal
|
- name: Symlink kubelet kubeconfig for calico/canal
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
- role: rkt
|
- role: rkt
|
||||||
tags: rkt
|
tags: rkt
|
||||||
when: "'rkt' in [etcd_deployment_type, kubelet_deployment_type, vault_deployment_type]"
|
when: "'rkt' in [etcd_deployment_type, kubelet_deployment_type, vault_deployment_type]"
|
||||||
|
- { role: download, tags: download, skip_downloads: false }
|
||||||
- { role: etcd, tags: etcd, etcd_cluster_setup: false }
|
- { role: etcd, tags: etcd, etcd_cluster_setup: false }
|
||||||
- { role: vault, tags: vault, when: "cert_management == 'vault'"}
|
- { role: vault, tags: vault, when: "cert_management == 'vault'"}
|
||||||
- { role: kubernetes/node, tags: node }
|
- { role: kubernetes/node, tags: node }
|
||||||
|
- { role: kubernetes/kubeadm, tags: kubeadm, when: "kubeadm_enabled" }
|
||||||
- { role: network_plugin, tags: network }
|
- { role: network_plugin, tags: network }
|
||||||
|
|
Loading…
Reference in a new issue