Skip to content

Commit

Permalink
operator/v1: remove optional from managementState
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed Mar 6, 2019
1 parent c379c21 commit c9d17fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion operator/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@ var (
// It will only upgrade the component if it is safe to do so
Managed ManagementState = "Managed"
// Unmanaged means that the operator will not take any action related to the component
// Some operators might not support this management state as it might damage the cluster and lead to manual recovery.
Unmanaged ManagementState = "Unmanaged"
// Removed means that the operator is actively managing its resources and trying to remove all traces of the component
// Some operators (like kube-apiserver-operator) might not support this management state as removing the API server will
// brick the cluster.
Removed ManagementState = "Removed"
)

// OperatorSpec contains common fields operators need. It is intended to be anonymous included
// inside of the Spec struct for your particular operator.
type OperatorSpec struct {
// managementState indicates whether and how the operator should manage the component
// +optional
// +kubebuilder:validation:Pattern=^Managed|Unmanaged|Force|Removed$
ManagementState ManagementState `json:"managementState"`

Expand Down

0 comments on commit c9d17fc

Please sign in to comment.