chaoskube
chaoskube copied to clipboard
Exclude static pods from termination
static pods cannot be killed via the Kubernetes API: https://kubernetes.io/docs/tasks/administer-cluster/static-pod/
Let's ignore them. We could use these annotations to detect what is a static pod:
metadata:
annotations:
kubernetes.io/config.hash: 3ffad4b19c937d5bb9cbacadb2f463a1
kubernetes.io/config.mirror: 3ffad4b19c937d5bb9cbacadb2f463a1
kubernetes.io/config.seen: 2018-04-09T07:44:01.286945749Z
kubernetes.io/config.source: file
Detection could be similar to: https://github.com/zalando-incubator/cluster-lifecycle-manager/blob/8042e37ad3fb482879112e8bc6d095c01ff2ef7c/pkg/updatestrategy/node_pool_manager.go#L481-L484