-
Notifications
You must be signed in to change notification settings - Fork 115
Use GVK to validate resource type #351
Use GVK to validate resource type #351
Conversation
…en irregular GroupResources. Cases: - GroupResource is specified in a singular form - GroupResource is specified without group
Welcome @hrk091! |
Hi @hrk091. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hrk091, rjbez17 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes: #343
Promlem
It is enforced to set Role and RoleBinding as 'Propagate' mode in the HNCConfiguration, but the validation is not enough. It is validated using GRs(GroupResources) user specified in the
spec.resources
field. GR includes some ambiguity and users can specify resources in several way (e.g. use empty group instead of "v1", use singular instead of plural). They are not picked up by the current isEnforcedType matcher and as a result they are registered to the activeGVKs even though duplicated. It causes the flapping between the enforced 'Propagate' state and the user given state like 'AllowPropagate' in the reconciliation phase as follows:How to address
Use GVK instead of GR to check whether enforcedType or not on both webhook validator and reconcilier.