-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wip] Add support for kubebuilder v2 #15
Comments
for now, two things should do:
|
I encourage you to take a look at the source code. We heavily rely on If there's an alternative way we can discover these things, we can make code changes. The code is pretty straightforward, search for Maybe there's an easy fix. |
The code for extracting group name is this line: The package comments are considered by Is it possible to consider type comments instead of package comments? For kubebuilder v2, some type comments contains (A temporary workaround is to manually create a doc.go which contains the |
Let's be more crisp here. Does every single type that correspond to a CRD actually have this field? (We currently inherit groupName for all types from that.) We currently have 1:1 mapping between "Go packages : groupName". Let's first make sure these two assumptions still hold true. |
To correct my observation: the groupName comments appear in |
I am not actually sure if k8s.io/gengo/parser package can read values of
consts/vars. So this is actually not useful
GroupVersion = schema.GroupVersion{Group: "kubeflow.org", Version: "v1"}
But as you said the // +groupName=kubeflow.org comment is still there.
I most probably will not be able to find the time to fix this so I
recommend you give it a try.
It seems like we need to implement this as a "fallback" to the existing
logic.
Maybe you can read all packages, create a map of <packages:groupNames> (we
get groupVersion from pkg name, e.g. /v1) and if the //+ comment is
missing, try to read it from that map, and if that's missing, too, fail.
|
@ahmetb Any update on kube builder support ? |
Nope, I am not actively working on this. |
This does currently not work for operators made with later versions of kubebuilder. |
No description provided.
The text was updated successfully, but these errors were encountered: