Skip to content
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

feat: if marker is not defaulted it should be marked as required #47

Closed
scottd018 opened this issue Jul 5, 2022 · 0 comments
Closed
Assignees

Comments

@scottd018
Copy link
Contributor

If a marker does not have a default value, the marker should be marked as a required value. It should look like this in the apis/<GROUP>/<VERSION>_types.go generated file:

	// +kubebuilder:validation:Required
	// Description of the service account goes here.
	ServiceAccount string `json:"serviceAccount"`

The following from above is relevant:

  1. The +kubebuilder:validation:Required should be added above the description.
  2. The omitempty tag should be missing (on the serviceAccount line)
  3. This should only apply to the end of a struct (e.g. google.serviceAccount is applicable google.serviceAccount.name is not applicable)
@scottd018 scottd018 self-assigned this Jul 23, 2022
scottd018 added a commit that referenced this issue Jul 23, 2022
Signed-off-by: Dustin Scott <dustin.scott18@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant