-
Notifications
You must be signed in to change notification settings - Fork 27
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
Remove useless omitempty #402
Remove useless omitempty #402
Conversation
it looks like only when refers: |
@@ -30,15 +30,14 @@ import ( | |||
type FunctionSpec struct { | |||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster | |||
// Important: Run "make" to regenerate code after modifying this file | |||
// +kubebuilder:validation:Required |
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.
I think spec.name
is not required
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.
for Function CRD it should be non-required since it is duplicated with .metadata.name
, but for Mesh CRD, which reuses FunctionSpec
and uses the .spec.name
in Mesh controller as well.
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.
lgtm
seems need to update the CRD content in |
we may then need a function to generate them automatically 🤣 |
@tpiperatgod Seems we need to change |
since #409 is merged, do we need to update the generated YAML in this PR and also other PRs which make changes to the CRD content? |
@jiangpengcheng yes, please update the CRDs with this PR. |
Fixes #383
Motivation
Remove omitempty if it's required
Modifications
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Documentation
Check the box below.
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
tiny fix
doc
(If this PR contains doc changes)