You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you do?
A clear and concise description of the steps you took (or insert a code snippet).
here is the command I issued and corresponding error:
operator-sdk add controller --api-version=core/v1 --kind=Namespace
INFO[0000] Generating controller version core/v1 for kind Namespace.
Error: group cannot be empty
Usage:
operator-sdk add controller [flags]
Flags:
--api-version string Kubernetes APIVersion that has a format of $GROUP_NAME/$VERSION (e.g app.example.com/v1alpha1)
-h, --help help for controller
--kind string Kubernetes resource Kind name. (e.g AppService)
What did you expect to see?
A clear and concise description of what you expected to happen (or insert a code snippet).
controller correclty generated
What did you see instead? Under which circumstances?
A clear and concise description of what you expected to happen (or insert a code snippet).
see error above
Environment
operator-sdk version:
operator-sdk --version
operator-sdk version v0.5.0+git
notice that this version is misleading. I am actually using the binary resulting from the compilation of the master branch.
Possible Solution
this worked:
operator-sdk add controller --api-version=core.com/v1 --kind=Namespace
INFO[0000] Generating controller version core.com/v1 for kind Namespace.
INFO[0000] Created pkg/controller/namespace/namespace_controller.go
INFO[0000] Created pkg/controller/add_namespace.go
INFO[0000] Controller generation complete.
I can fix the generated code manually.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Group names are typically in domain name form - the Kubernetes project reserves use of the empty group, all single word names ("extensions", "apps"), and any group name ending in "*.k8s.io" for its sole use. When choosing a group name, we recommend selecting a subdomain your group or organization owns, such as "widget.mycompany.com".
But I guess that only makes sense for defining new apis. If you're adding a controller to watch a k8s resource(with a single word group) as the primary resource then that'll be a problem.
As a work around for now, you can fix it in after the fact. add controller --api-version=core.com/v1 and then change the group to core the file.
@estroz Since that was added in #815 I was wondering if we can somehow relax this check for when we add controllers, or altogether with a warning?
Side note: Truncated the issue for clarity and removing the prompt for Gopkg.lock in the bug report template #1194
Bug Report
What did you do?
A clear and concise description of the steps you took (or insert a code snippet).
here is the command I issued and corresponding error:
What did you expect to see?
A clear and concise description of what you expected to happen (or insert a code snippet).
controller correclty generated
What did you see instead? Under which circumstances?
A clear and concise description of what you expected to happen (or insert a code snippet).
see error above
Environment
notice that this version is misleading. I am actually using the binary resulting from the compilation of the master branch.
Possible Solution
this worked:
I can fix the generated code manually.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: