ddffdb63bf
* Remove non-kubeadm deployment * More cleanup * More cleanup * More cleanup * More cleanup * Fix gitlab * Try stop gce first before absent to make the delete process work * More cleanup * Fix bug with checking if kubeadm has already run * Fix bug with checking if kubeadm has already run * More fixes * Fix test * fix * Fix gitlab checkout untill kubespray 2.8 is on quay * Fixed * Add upgrade path from non-kubeadm to kubeadm. Revert ssl path * Readd secret checking * Do gitlab checks from v2.7.0 test upgrade path to 2.8.0 * fix typo * Fix CI jobs to kubeadm again. Fix broken hyperkube path * Fix gitlab * Fix rotate tokens * More fixes * More fixes * Fix tokens
106 lines
2.8 KiB
YAML
106 lines
2.8 KiB
YAML
---
|
|
- name: Master | restart kubelet
|
|
command: /bin/true
|
|
notify:
|
|
- Master | reload systemd
|
|
- Master | reload kubelet
|
|
- Master | wait for master static pods
|
|
|
|
- name: Master | wait for master static pods
|
|
command: /bin/true
|
|
notify:
|
|
- Master | wait for the apiserver to be running
|
|
- Master | wait for kube-scheduler
|
|
- Master | wait for kube-controller-manager
|
|
|
|
- name: Master | Restart apiserver
|
|
command: /bin/true
|
|
notify:
|
|
- Master | Remove apiserver container
|
|
- Master | wait for the apiserver to be running
|
|
|
|
- name: Master | Restart kube-scheduler
|
|
command: /bin/true
|
|
notify:
|
|
- Master | Remove scheduler container
|
|
- Master | wait for kube-scheduler
|
|
|
|
- name: Master | Restart kube-controller-manager
|
|
command: /bin/true
|
|
notify:
|
|
- Master | Remove controller manager container
|
|
- Master | wait for kube-controller-manager
|
|
|
|
- name: Master | reload systemd
|
|
command: systemctl daemon-reload
|
|
|
|
- name: Master | reload kubelet
|
|
service:
|
|
name: kubelet
|
|
state: restarted
|
|
|
|
- name: Master | Remove apiserver container
|
|
shell: "docker ps -af name=k8s_kube-apiserver* -q | xargs --no-run-if-empty docker rm -f"
|
|
register: remove_apiserver_container
|
|
retries: 4
|
|
until: remove_apiserver_container.rc == 0
|
|
delay: 5
|
|
|
|
- name: Master | Remove scheduler container
|
|
shell: "docker ps -af name=k8s_kube-scheduler* -q | xargs --no-run-if-empty docker rm -f"
|
|
register: remove_scheduler_container
|
|
retries: 4
|
|
until: remove_scheduler_container.rc == 0
|
|
delay: 5
|
|
|
|
- name: Master | Remove controller manager container
|
|
shell: "docker ps -af name=k8s_kube-controller-manager* -q | xargs --no-run-if-empty docker rm -f"
|
|
register: remove_cm_container
|
|
retries: 4
|
|
until: remove_cm_container.rc == 0
|
|
delay: 5
|
|
|
|
- name: Master | wait for kube-scheduler
|
|
uri:
|
|
url: http://localhost:10251/healthz
|
|
register: scheduler_result
|
|
until: scheduler_result.status == 200
|
|
retries: 60
|
|
delay: 5
|
|
|
|
- name: Master | wait for kube-controller-manager
|
|
uri:
|
|
url: http://localhost:10252/healthz
|
|
register: controller_manager_result
|
|
until: controller_manager_result.status == 200
|
|
retries: 15
|
|
delay: 5
|
|
|
|
- name: Master | wait for the apiserver to be running
|
|
uri:
|
|
url: "{{ kube_apiserver_endpoint }}/healthz"
|
|
validate_certs: no
|
|
client_cert: "{{ kube_apiserver_client_cert }}"
|
|
client_key: "{{ kube_apiserver_client_key }}"
|
|
register: result
|
|
until: result.status == 200
|
|
retries: 30
|
|
delay: 10
|
|
|
|
- name: Master | set secret_changed
|
|
command: /bin/true
|
|
notify:
|
|
- Master | set secret_changed to true
|
|
- Master | Copy new kubeconfig for root user
|
|
|
|
- name: Master | set secret_changed to true
|
|
set_fact:
|
|
secret_changed: true
|
|
|
|
- name: Master | Copy new kubeconfig for root user
|
|
copy:
|
|
src: "{{ kube_config_dir }}/admin.conf"
|
|
dest: "/root/.kube/config"
|
|
remote_src: yes
|
|
mode: "0600"
|
|
backup: yes
|