We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b426c4 commit b2572e6Copy full SHA for b2572e6
templates/apis/crd.go.tpl
@@ -20,13 +20,13 @@ type {{ .CRD.Kind }}Spec struct {
20
{{ $field.GetDocumentation }}
21
{{ end -}}
22
23
-{{- if $field.IsImmutable }}
+{{- if $field.IsImmutable -}}
24
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable once set"
25
-{{- end }}
+{{ end -}}
26
27
-{{- if and ($field.IsRequired) (not $field.HasReference) }}
+{{- if and ($field.IsRequired) (not $field.HasReference) -}}
28
// +kubebuilder:validation:Required
29
30
31
{{ $field.Names.Camel }} {{ $field.GoType }} {{ $field.GetGoTag }}
32
{{- end }}
0 commit comments