Debug taints #2
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Danny Bessems 2022-11-21 12:37:12 +01:00
parent 4786507366
commit 0d7b1ab269
1 changed files with 9 additions and 8 deletions

View File

@ -11,15 +11,16 @@
INSTALL_K3S_EXEC: 'server --cluster-init --disable local-storage' INSTALL_K3S_EXEC: 'server --cluster-init --disable local-storage'
when: ansible_facts.services['k3s.service'] is undefined when: ansible_facts.services['k3s.service'] is undefined
- ansible.builtin.shell: - name: Debug possible taints on k3s node
ansible.builtin.shell:
cmd: >- cmd: >-
kubectl get nodes -o go-template='{{range $item := .items}}{{with $nodename := $item.metadata.name}}{{range $taint := $item.spec.taints}}{{if (eq $taint.effect "NoSchedule")}}{{printf "%s\n" $nodename}}{{end}}{{end}}{{end}}{{end}}' while true;
kubectl get nodes -o jsonpath='{range .items[]}{.metadata.name}{"\t"}{.spec.taints[].effect}{"\n"}{end}' do
with_sequence: count=50 kubectl get nodes -o custom-columns=NAME:.metadata.name,TAINTS:.spec.taints --no-headers | awk '{print strftime("%H:%M:%S"),$0;fflush();}' >> /var/log/taintlog
register: taints sleep 1
done
- debug: async: 1800
var: taints poll: 0
- name: Ensure API availability - name: Ensure API availability
ansible.builtin.uri: ansible.builtin.uri: