feat(controller): add generic cluster scoped resources to proxysettings #421
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this feature you can grant
LIST
permissions to cluster-scoped resources based on Labels. This Feature is added as FeatureGate and therefor not active on default installations of the capsule-proxy. Usage with the Flag--feature-gates=ProxyClusterScoped=true
Example
Here's an example implementation of the clusterResource settings:
Create a namespace as alice to propagate proxySettings:
Create the ProxySettings:
This setting allows alice to:
LIST
all*. kyverno.io/*
resources with the label-valueconsumer: customer
LIST
allmutatingwebhookconfigurations.admissionregistration.k8s.io/v1
with the label-valueconsumer: tenant
Label some resources that they match and run some commands:
Helm CRD lifecycle
This version also introduces a new flow how we can manage the CRDs with Helm beyond the install lifecycle. It's a simple template which renders the crds and by default keeps the crds even if the release is deleted. In the Chart README.md the entire upgrading process is documented.
This change is by default not breaking, because the current lifecycle process is not active. This way our users can opt-in and perform the required actions for the upgrade (documented in the README.md of the chart). All these changes are done with this commit:
When deleting the chart, the default behavoir is to keep the installed CRDs:
Note: Should this change be accepted, I would like to introduce this cycle on the capsule helm chart as well, but with the next major release.