I am trying to create the manifests using the kubebuilder markers. This is working fine but I noticed one tiny issue which might drive you crazy.
If we add the user comment or TODO comments immediately on the next line of the markers then manifests are not getting generated
For example,
//+kubebuilder:webhook:path=/mutate,mutating=true,failurePolicy=fail,groups=test.prac.io,resources=foo;bar,verbs=create;update,versions=v1alpha1,name=mapplication.kb.io
//+kubebuilder:webhook:verbs=create;update,path=/validate,mutating=false,failurePolicy=fail,groups=test.prac.io,resources=foo;bar,versions=v1alpha1,name=vapplication.kb.io
// TODO: Handle all the cases
Please notice that there is an empty line after the kubebuilder markers. This is working fine and manifests are getting generated.
Issue:
If I try the following,
//+kubebuilder:webhook:path=/mutate,mutating=true,failurePolicy=fail,groups=test.prac.io,resources=foo;bar,verbs=create;update,versions=v1alpha1,name=mapplication.kb.io
//+kubebuilder:webhook:verbs=create;update,path=/validate,mutating=false,failurePolicy=fail,groups=test.prac.io,resources=foo;bar,versions=v1alpha1,name=vapplication.kb.io
// TODO: Handle all the cases
Please notice that there is no blank line after the markers. because of this, blank manifests are getting generated. I am not sure if it's expected behavior. I think this is an issue as we are expecting the markers to start with //+kubebuilder
Versions:
Golang version: 1.12.9
kubebuilder version: 2.2.0
Kubernetes version: 1.16.3
/kind bug
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4