Open
Description
So when using the Operator-SDK it generates a go file like groupversion_info.go in your main API package. This defines stuff like:
// Package v1alpha1 contains API Schema definitions for the cal.casa.eu v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=group.example.com
// +k8s:deepcopy-gen=package,register
// +k8s:openapi-gen=true
// +genclient
package v1alpha1
I added the genclient and k8s:openapi-gen=true, both of those are ignored by the way and need to be on every type.
But it also ignores the groupName so the applyconfiguration object ends up with
b.WithAPIVersion("v1alpha1")
While I expect
b.WithAPIVersion("group.example.com/v1alpha1")
Which I can fix with sed
but I feel like it shouldn't really be a thing. I'm at a loss currently as to how to get it to first respect the tags on the package and then to actually include the groupName.
I got my generation code from here: cert-manager/cert-manager#5383
Metadata
Metadata
Assignees
Labels
No labels