diff --git a/pkg/gen/controller/example_test.go b/pkg/gen/controller/example_test.go index 46a503d363c..182d50eda13 100644 --- a/pkg/gen/controller/example_test.go +++ b/pkg/gen/controller/example_test.go @@ -16,11 +16,11 @@ limitations under the License. package controller_test -func Example() {} - -// +kubebuilder:controller:group=foo,version=v1beta1,kind=Bar,resource=bars -// +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:informers:group=apps,version=v1,kind=Deployment -// +kubebuilder:rbac:groups="",resources=pods,verbs=get;watch;list -// +kubebuilder:informers:group=core,version=v1,kind=Pod -type FooController struct{} +func Example() { + // +kubebuilder:controller:group=foo,version=v1beta1,kind=Bar,resource=bars + // +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete + // +kubebuilder:informers:group=apps,version=v1,kind=Deployment + // +kubebuilder:rbac:groups="",resources=pods,verbs=get;watch;list + // +kubebuilder:informers:group=core,version=v1,kind=Pod + type FooController struct{} +}