operator: fix kubebuilder validation marker location
Move the kubebuilder validation marker location for ManagementState
to the type definition where it belongs.
@@ -23,6 +23,7 @@ type MyOperatorResourceStatus struct {
OperatorStatus `json:",inline"`
}
+// +kubebuilder:validation:Pattern=^(Managed|Unmanaged|Force|Removed)$
type ManagementState string
var (
@@ -45,7 +46,6 @@ var (
// inside of the Spec struct for your particular operator.
type OperatorSpec struct {
// managementState indicates whether and how the operator should manage the component
- // +kubebuilder:validation:Pattern=^(Managed|Unmanaged|Force|Removed)$
ManagementState ManagementState `json:"managementState"`
// logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a
