Does Kubebuilder Annotation support NamespaceSelector? #2461
-
Can kubebuilder_annotation support the following namespace configuration?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
KubeBuilder annotations (markers) don't provide direct support for the namespaceSelector configuration in webhooks. You would need to add the namespaceSelector field manually to the generated webhook configuration after using the CLI. While KubeBuilder can scaffold a large portion of your webhook configuration using annotations like:
Also, you might be interested in the the option available in the kustomize.yml to create labels kubebuilder/testdata/project-v4/config/default/kustomization.yaml Lines 11 to 15 in 6893605 Regarding the original question, I'd recommend raising an issue with the controller-tools project, as it is responsible for the logic behind the markers. You can find the project here. It may be beneficial to present it as a Request for Enhancement (RFE) to draw attention to this specific need. Closing this one as answered. |
Beta Was this translation helpful? Give feedback.
KubeBuilder annotations (markers) don't provide direct support for the namespaceSelector configuration in webhooks. You would need to add the namespaceSelector field manually to the generated webhook configuration after using the CLI.
While KubeBuilder can scaffold a large portion of your webhook configuration using annotations like:
Also, you might be interested in the the option available in the kustomize.yml to create labels
See:
kubebuilder/testdata/project-v4/config/default/kustomization.yaml
Lines 11 to 15 in 6…