kube-monkey
kube-monkey copied to clipboard
Simplify labels to opt in to chaos
https://github.com/asobti/kube-monkey#example-of-opted-in-deployment-killing-one-pod-per-purge
Currently these need to be set at both metadata.labels and spec.template.metadata.labels. This can lead to conflicting configurations where we have different values in each of these. It also means we have duplicate work which is not ideal.
I wonder if we can just declare them in one place and update the filters to work with just that?
Option 1 metadata.labels: it may look semantically correct since we are targeting a deployment, but these labels are not applied to the pods created by the deployment. I'm not sure if that's an issue at this point, other than it may impair troubleshooting.
Option 2 spec.template.metadata.labels: it feels like we're adding them because it's convenient for filters and not because it's the correct place to add them. This option however would allow us to do the top level filtering (by deployment) and then by pod too,