Debug taints #2
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2022-11-21 12:37:12 +01:00
parent 4786507366
commit 0d7b1ab269

View File

@ -11,15 +11,16 @@
INSTALL_K3S_EXEC: 'server --cluster-init --disable local-storage'
when: ansible_facts.services['k3s.service'] is undefined
- ansible.builtin.shell:
- name: Debug possible taints on k3s node
ansible.builtin.shell:
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}}'
kubectl get nodes -o jsonpath='{range .items[]}{.metadata.name}{"\t"}{.spec.taints[].effect}{"\n"}{end}'
with_sequence: count=50
register: taints
- debug:
var: taints
while true;
do
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
sleep 1
done
async: 1800
poll: 0
- name: Ensure API availability
ansible.builtin.uri: