diff --git a/templates/apis/crd.go.tpl b/templates/apis/crd.go.tpl index 68584f4d..56e2dd59 100644 --- a/templates/apis/crd.go.tpl +++ b/templates/apis/crd.go.tpl @@ -30,16 +30,19 @@ type {{ .CRD.Kind }}Status struct { // All CRs managed by ACK have a common `Status.ACKResourceMetadata` member // that is used to contain resource sync state, account ownership, // constructed ARN for the resource + // +kubebuilder:validation:Optional ACKResourceMetadata *ackv1alpha1.ResourceMetadata `json:"ackResourceMetadata"` // All CRS managed by ACK have a common `Status.Conditions` member that // contains a collection of `ackv1alpha1.Condition` objects that describe // the various terminal states of the CR and its backend AWS service API // resource + // +kubebuilder:validation:Optional Conditions []*ackv1alpha1.Condition `json:"conditions"` {{- range $fieldName, $field := .CRD.StatusFields }} {{- if $field.ShapeRef }} {{ $field.ShapeRef.Documentation }} {{- end }} + // +kubebuilder:validation:Optional {{ $field.Names.Camel }} {{ $field.GoType }} `json:"{{ $field.Names.CamelLower }},omitempty"` {{- end }} }