You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sathieu can you provide exact steps to replicate your issue? I tested the assign mutator you provided with deleting a pod that existed before the mutator was applied and I didn't face the same issue.
Describe the solution you'd like
We have a few mutations changing immutable fields, this is particularly the case for Pods.
For example: mutation-mustRunAsNonRoot.yaml
This is preventing Pod deletions if the Pod was created before the admission.
Suggestion:
Add a
spec.operations
(defaulting to['*']
) toAssign
andAssignMetadata
. Example:Anything else you would like to add:
We workaround this with label selector, and we apply the labels to any pod stuck in Terminating state.
See: https://gitlab.com/kubitus-project/kubitus-installer/-/blob/d7aeb334a6d6404f5a006b09ac928f21123a896d/roles/gatekeeper/files/helm/templates/library/mutation/pod-security-policy/users-mustRunAsNonRoot.yaml.yaml#L29-34
Environment:
kubectl version
): 1.29.xThe text was updated successfully, but these errors were encountered: