gator: null initContainers combined with securityContext MustNotExist pathTest triggers error: mismatch between path entry (type: List) and received object (type: <nil>). #3463
Labels
bug
Something isn't working
What steps did you take and what happened:
With gator a null initContainers combined with securityContext MustNotExist pathTest triggers this error:
$ gator expand < <(yq -c . expansion-templates.yaml; yq -c . tetrisdefaultsecuritycontext-init.yaml; yq -c . cilium-dnsproxy_daemonset.yaml)
error expanding resources: error expanding resource cilium-dnsproxy: failed to mutate resultant resource cilium-dnsproxy-pod: mutation caaa4af9-4739-476a-9d3b-052fa2de87d9 for mutator Assign.mutations.gatekeeper.sh /tetrisdefaultsecuritycontext-init failed for Pod kube-system cilium-dnsproxy-pod: mismatch between path entry (type: List) and received object (type: ). Path: [name: *]
gator-yaml-input.zip
This is the mutation which interacts badly with the null initContainers (also included in the attached zip file):
What did you expect to happen:
Maybe it could behave as though the initContainers is missing when it is set to null.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): v1.28.10The text was updated successfully, but these errors were encountered: