-
Notifications
You must be signed in to change notification settings - Fork 106
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
HNC: Prevent updating labels and annotations with hnc.x-k8s.io suffix on propagated objects #10
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@adrianludwin: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@adrianludwin could you give some pointers to get started for this issue? where to look in code for propagated objects? |
The validator for propagated objects is https://github.com/kubernetes-sigs/hierarchical-namespaces/blob/master/internal/objects/validator.go. I just glanced at the code and it looks like we will stop users from modifying any annotation except the annotations that include hnc.x-k8s.io (see this line). The problem is that the How about this as a solution: a few lines above, we check whether the Whatever you do, can you please add unit tests that fail before you add the fix, and pass afterwards? And note this in the commit comment (e.g. like this). Thanks! |
I updated the title to reflect what I believe the problem actually is. |
/assign |
@adrianludwin Thanks for the brief explanation .I got the problem. |
This was fixed correctly /remove-lifecycle stale |
Issue by yiqigao217
Thursday Apr 29, 2021 at 21:12 GMT
Originally opened as kubernetes-retired/multi-tenancy#1500
The webhook does prevent editing the propagated object itself or labels but doesn't prevent updating annotations:
The text was updated successfully, but these errors were encountered: