-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When tenant label is set on a NetworkPolicy, modifying isn't allowed #1058
Comments
Hi, that's as intended. It arises the question why you at the tenant label to a netpol, it doesn't really do anything except allowing the behavoir you are reporting. This label should be set on resources which are reconciled by the controller. Without it it will just work. I see your point, it's a bit ugly. But Also we are going to deprecate the netpol feature in the stable release in favour of tenantReplications: |
Thanks for the reporting, @sandert-k8s. As Oliver, pointed, the idea is to shift these resources handling to the Global Tenant Resource API which is able to replicate objects without a complicated logic across the Tenants: it would ne very valuable your feedback about this, also considering that resources replicated with that API are immutable for tenant owners, but happy to chat more. Besides that, I'm happy seeing Capsule used on OCP, wondering if we could connect on the Slack workspace to gather more details about it, hope we can continue there to avoid polluting the GH issue. |
Thanks for your fast replies Oliver and Prometherion. Check, if this is as desired, we will use a other label instead of this one. And sure, we can connect in Slack. I'll drop a message in a bit. |
Will be fixed because this might lead to errors with the capsule-proxy enabled |
Bug description
When the label
capsule.clastix.io/tenant: [tenantname]
is set on a networkpolicy, deletion and patching isn't possible as a tenant admin.How to reproduce
Steps to reproduce the behavior:
We've reproduced this in our production environment (Capsule on OpenShift), but also on a clean Kind cluster and installed with the basic setup from the quick start.
The networkpolicy:
The creation of this networkpolicy works, but patching and deletion isn't working. This is executed as Tenant Admin (in the tutorial as user
alice
).~ % kubectl delete -f ./test-netpol.yml
~ % kubectl delete netpol test-netpol -n oil-production
The same happens when we try to edit the networkpolicy instead of deleting:
~ % kubectl edit netpol test-netpol -n oil-production
Only solution is to delete the tenant label from the networkpolicy as a cluster admin.
Expected behavior
Patching or deleting the NetworkPolicy should be possible and not be rejected by Capsule.
Logs
The text was updated successfully, but these errors were encountered: