workaround_ha_apiserver
parent
cece179bd4
commit
baaa6efc2b
|
@ -5,7 +5,7 @@
|
|||
dest: /lib/systemd/system/etcd.service
|
||||
backup: yes
|
||||
when: init_system == "systemd"
|
||||
notify: restart systemd-etcd
|
||||
notify: restart etcd
|
||||
|
||||
- name: Configure | Write etcd initd script
|
||||
template:
|
||||
|
|
|
@ -58,15 +58,6 @@
|
|||
backup: yes
|
||||
when: init_system == "sysvinit" and ansible_os_family == "Debian"
|
||||
|
||||
- name: Restart apiserver
|
||||
command: /bin/true
|
||||
notify: restart kube-apiserver
|
||||
changed_when: is_gentoken_calico|default(false) or kube_apiserver_copy.stdout_lines
|
||||
|
||||
- name: Allow apiserver to bind on both secure and insecure ports
|
||||
shell: setcap cap_net_bind_service+ep {{ bin_dir }}/kube-apiserver
|
||||
changed_when: false
|
||||
|
||||
- name: Write kube-apiserver config file
|
||||
template:
|
||||
src: "kube-apiserver.j2"
|
||||
|
@ -74,11 +65,14 @@
|
|||
backup: yes
|
||||
notify: restart kube-apiserver
|
||||
|
||||
# restart apiserver if calico tokens list has changed
|
||||
- name: Reload tokens (restart apiserver)
|
||||
command: /bin/true
|
||||
- name: Allow apiserver to bind on both secure and insecure ports
|
||||
shell: setcap cap_net_bind_service+ep {{ bin_dir }}/kube-apiserver
|
||||
changed_when: false
|
||||
|
||||
- name: Restart apiserver
|
||||
command: "/bin/true"
|
||||
notify: restart kube-apiserver
|
||||
changed_when: is_gentoken_calico|default(false)
|
||||
when: is_gentoken_calico|default(false) or kube_apiserver_copy.stdout_lines
|
||||
|
||||
# reload-systemd
|
||||
- meta: flush_handlers
|
||||
|
@ -105,7 +99,6 @@
|
|||
- name: wait for the apiserver to be running
|
||||
wait_for:
|
||||
port: "{{kube_apiserver_insecure_port}}"
|
||||
delay: 10
|
||||
timeout: 60
|
||||
|
||||
- name: Create 'kube-system' namespace
|
||||
|
@ -128,3 +121,15 @@
|
|||
template:
|
||||
src: manifests/kube-podmaster.manifest.j2
|
||||
dest: "{{ kube_manifest_dir }}/kube-podmaster.manifest"
|
||||
|
||||
- name: restart kubelet
|
||||
service:
|
||||
name: kubelet
|
||||
state: restarted
|
||||
changed_when: false
|
||||
|
||||
- name: Enable apiserver
|
||||
service:
|
||||
name: kube-apiserver
|
||||
enabled: yes
|
||||
state: started
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
command: /bin/true
|
||||
notify:
|
||||
- reload systemd
|
||||
- reload kubelet
|
||||
- restart kubelet
|
||||
|
||||
- name: set is_gentoken_calico fact
|
||||
set_fact:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
- name: install | Write kubelet systemd init file
|
||||
template: src=kubelet.service.j2 dest=/etc/systemd/system/kubelet.service backup=yes
|
||||
when: init_system == "systemd"
|
||||
notify: restart systemd-kubelet
|
||||
notify: restart kubelet
|
||||
|
||||
- name: install | Write kubelet initd script
|
||||
template: src=deb-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=755 backup=yes
|
||||
|
|
Loading…
Reference in New Issue