Policy to delete multiple entry on mutating resources #593
Replies: 4 comments 25 replies
-
You have both of these configured as "mutate existing" rules, meaning they will take effect at the time you create the policy, on EXISTING resources. From your description, it's not clear if this is what you want. You should only use this rule type if you do not want to mutate based upon admission requests. What is your desire here? |
Beta Was this translation helpful? Give feedback.
-
I was able to reproduce this bug on 1.10.0-alpha.2 and have logged #7051 and scheduled for 1.10. |
Beta Was this translation helpful? Give feedback.
-
With current add policy, the entry is duplicate, what could be the issue for that?
|
Beta Was this translation helpful? Give feedback.
-
Is this question resolved? |
Beta Was this translation helpful? Give feedback.
-
Summary: Delete multiple entry for a matching name
Hi everyone,
I'm using Kyverno policy to do some automation to an istioOperator for some Kubernetes events / object get triggered,
I have 3 policy here, with the following details:
generate-iop-cr-ingressgateway
, be triggered for every new namespace that start withproduct-*
on the name.istio-mesh-manager-add
, Add 2 diffrent type of entry at a time (opentelemetry-{{ request.object.metadata.name }}
andoauth2-proxy-{{ request.object.metadata.name }}
).remove-auth-provider
, remove the 2 entry created on policy number 2, with current policy only able to delete 1.Steps to reproduce:
Create these prerequisites object before triggering the policy:
generate-iop-cr-ingressgateway
policy.istio-mesh-manager-add
policy.istio-mesh-manager-delete
policy.generate-iop-cr-ingressgateway
andistio-mesh-manager-add
policy with:by creating that namespace and label, the 2 Kyverno policy (
generate-iop-cr-ingressgateway
andistio-mesh-manager-add
) will generate an IstioOperator object and add the 2 different type of entry at a time (theoauth2-proxy-{{ request.object.metadata.name }}
andopentelemetry-{{ request.object.metadata.name }}
)istio-mesh-manager-delete
)The current delete policy only remove 1 of the matching entry (from total 2)
Looking for an advise to delete 2 entry at a time when there is a delete trigger to the namespace name.
Beta Was this translation helpful? Give feedback.
All reactions