-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: Corrects CRD and Swagger types. Fixes #3578 #3809
Conversation
// +protobuf.options.(gogoproto.goproto_stringer)=false | ||
// +k8s:openapi-gen=true | ||
// +kubebuilder:validation:Type=object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually not fixable, because Item
can be anything, but code-generator
mandates a single type only, we must choose the best/least worst type.
@@ -338,8 +338,9 @@ func (s ShutdownStrategy) ShouldExecute(isOnExitPod bool) bool { | |||
} | |||
} | |||
|
|||
// +kubebuilder:validation:Type=array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubebuilder is too limited to correctly describe this type. We must choose a best option.
@@ -379,7 +380,7 @@ func (p *ParallelSteps) UnmarshalJSON(value []byte) error { | |||
return nil | |||
} | |||
|
|||
func (p *ParallelSteps) MarshalJSON() ([]byte, error) { | |||
func (p ParallelSteps) MarshalJSON() ([]byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MarshallJSON
MUST not be a pointer receiver, otherwise we cannot marshal not-pointer instances of the type.
Need @jessesuen to approve proto changes. |
Migrating to generator v0.4.0 (which would allow the |
@jessesuen tried out v0.4.0 and got it working, but looks like IntellI does not support |
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.Fixes #3578