Skip to content

Mutate target resource which is different from watched resource #2139

@chipzoller

Description

@chipzoller

Is your feature request related to a problem? Please describe.
Today, Kyverno only has the ability to mutate the same object that is incoming. There are use cases where existing object X needs to be watched and, if changed, perform a mutation on existing object Y. In one user's words:

I am watching a Secret, if the secret gets updated I will restart the deployment (for restarting the deployment I was thinking of adding an annotation using mutate policy when the secret is updated).
(I want to restart the deployment because the app running in it does not load the new secret automatically)

Describe the solution you'd like
Enhance Kyverno to be able to mutate objects other than the one defined in an AdmissionReview request.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestmutationIssues pertaining to the mutate ability.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions