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
// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".spec.Replicas",description="The number of MyCoolCRD instances"typeMyCoolCRDstruct {
metav1.TypeMeta`json:",inline"`
metav1.ObjectMeta`json:"metadata,omitempty"`SpecMyCoolCRDSpec`json:"spec,omitempty"`StatusMyCoolCRDStatus`json:"status,omitempty"`
}
What did you expect to see?
Expected to see it in the generated CRD.
What did you see instead? Under which circumstances?
$ GOFLAGS="-v" operator-sdk generate openapi
INFO[0001] Running OpenAPI code-generation for Custom Resource group versions: [k8s:[v1alpha1], ]
2019/03/15 14:36:53 Code for OpenAPI definitions generated
[debug] name="Replicas"
[debug] type="integer"
[debug] JSONPath=".spec.Replicas"
[debug] description="The number of MyCoolCRD instances"INFO[0004] Created deploy/crds/k8s_v1alpha1_woot_crd.yaml
INFO[0004] Code-generation complete.
Environment
operator-sdk version:
operator-sdk version v0.5.0+git
Are you writing your operator in ansible, helm, or go?
go
Possible Solution
Additional context
If it is an upstream issue please advise the repo to report and probably to fix it. Kubebuilder looks great as a tool but it looks a bit immature at the same time. I've run in a number of issues possibly related to kubebuilder in a couple of days and don't want to flood here ) And I see that there are other people complaining about it.
The text was updated successfully, but these errors were encountered:
@nrvnrvn Thanks for reporting this. I was able to confirm this bug. Doesn't seem to be an upstream bug. Side note: This doesn't relate directly to kubebuilder. It's the crd generator from the controller-tools repo that both kubebuilder and operator sdk are using.
I think this is probably due to the way we regenerate and only append the validation block to an existing CRD manifest.
Bug Report
What did you do?
added the following annotation:
What did you expect to see?
Expected to see it in the generated CRD.
What did you see instead? Under which circumstances?
Environment
operator-sdk version:
operator-sdk version v0.5.0+git
Kubernetes version information:
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-03-01T23:34:27Z", GoVersion:"go1.12", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-02-28T13:30:26Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Kubernetes cluster kind:
Are you writing your operator in ansible, helm, or go?
go
Possible Solution
Additional context
If it is an upstream issue please advise the repo to report and probably to fix it. Kubebuilder looks great as a tool but it looks a bit immature at the same time. I've run in a number of issues possibly related to kubebuilder in a couple of days and don't want to flood here ) And I see that there are other people complaining about it.
The text was updated successfully, but these errors were encountered: