Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions roles/kube-node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 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: 获取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: 轮询等待node达到Ready状态
shell: "{{ bin_dir }}/kubectl get node {{ inventory_hostname }}|awk 'NR>1{print $2}'"
Expand Down