Skip to content

Custom path for webhooks #4295

Open
@damsien

Description

@damsien

What do you want to happen?

Hello, I'm coming here to talk about these closed issues #1436 & #1333 that were considered as a bug.

The issue is the following: when I generate the webhook file with kubebuilder create api, an annotation is automatically generated in this form: //+kubebuilder:webhook:path=/validate-xxx-xxx-v1-xxx,mutating=false,.... This annotation can make the developer think that he can actually modify the path (which is not the case as explained here).

The previous issues where blocked mostly because the controller-runtime project didn't implement the custom path feature. However, I recently made a PR that have been merged. This PR adds the ability for the developer to choose to use a custom path for his webhooks.

My idea here is to let the developer choose a custom path if he wants to in his kubebuilder project. This choice will be made only when calling the creation command (kubebuilder create webhook) with a --custom-path flag. By using this flag, kubebuilder will generate an annotation including the custom path of the developer (//+kubebuilder:webhook:path=/my-custom-path,mutating=false,...).

If this feature is accepted, I would like to work on this issue.

Extra Labels

No response

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions