移除 kube-node csr 请求批准部分

pull/420/head
lixianyang 2018-12-06 17:57:18 +08:00 committed by jmgao
parent c3033dc4de
commit 0a57c136a7
1 changed files with 11 additions and 11 deletions

View File

@ -95,18 +95,18 @@
retries: 8
delay: 2
- name: 获取csr 请求信息
shell: "sleep 3 && {{ bin_dir }}/kubectl get csr"
delegate_to: "{{ groups.deploy[0] }}"
register: csr_info
run_once: true
#- name: 获取csr 请求信息
# shell: "sleep 3 && {{ bin_dir }}/kubectl get csr"
# delegate_to: "{{ groups.deploy[0] }}"
# register: csr_info
# run_once: true
- name: approve-kubelet-csr
shell: "{{ bin_dir }}/kubectl get csr|grep 'Pending' | awk 'NR>0{print $1}'| \
xargs {{ bin_dir }}/kubectl certificate approve"
when: '"Pending" in csr_info.stdout'
delegate_to: "{{ groups.deploy[0] }}"
run_once: true
#- name: approve-kubelet-csr
# shell: "{{ bin_dir }}/kubectl get csr|grep 'Pending' | awk 'NR>0{print $1}'| \
# xargs {{ bin_dir }}/kubectl certificate approve"
# when: '"Pending" in csr_info.stdout'
# delegate_to: "{{ groups.deploy[0] }}"
# run_once: true
- name: 轮询等待node达到Ready状态
shell: "{{ bin_dir }}/kubectl get node {{ inventory_hostname }}|awk 'NR>1{print $2}'"