diff --git a/constraint/config/crds/templates.gatekeeper.sh_constrainttemplates.yaml b/constraint/config/crds/templates.gatekeeper.sh_constrainttemplates.yaml index a9b38df68..1d9741256 100644 --- a/constraint/config/crds/templates.gatekeeper.sh_constrainttemplates.yaml +++ b/constraint/config/crds/templates.gatekeeper.sh_constrainttemplates.yaml @@ -258,14 +258,14 @@ spec: type: string type: array operations: - enum: - - '*' - - CREATE - - DELETE - - UPDATE - - CONNECT items: description: OperationType specifies an operation for a request. + enum: + - '*' + - CREATE + - DELETE + - UPDATE + - CONNECT type: string type: array rego: diff --git a/constraint/deploy/crds.yaml b/constraint/deploy/crds.yaml index 94a87c5d8..2f4990e04 100644 --- a/constraint/deploy/crds.yaml +++ b/constraint/deploy/crds.yaml @@ -257,14 +257,14 @@ spec: type: string type: array operations: - enum: - - '*' - - CREATE - - DELETE - - UPDATE - - CONNECT items: description: OperationType specifies an operation for a request. + enum: + - '*' + - CREATE + - DELETE + - UPDATE + - CONNECT type: string type: array rego: diff --git a/constraint/pkg/apis/templates/v1alpha1/constrainttemplate_types.go b/constraint/pkg/apis/templates/v1alpha1/constrainttemplate_types.go index 13a9e6ef9..3f476d287 100644 --- a/constraint/pkg/apis/templates/v1alpha1/constrainttemplate_types.go +++ b/constraint/pkg/apis/templates/v1alpha1/constrainttemplate_types.go @@ -71,7 +71,7 @@ type Target struct { // +listMapKey=engine Code []Code `json:"code,omitempty"` - // +kubebuilder:validation:Enum="*";CREATE;DELETE;UPDATE;CONNECT + // +kubebuilder:validation:items:Enum=*;CREATE;DELETE;UPDATE;CONNECT Operations []admissionv1.OperationType `json:"operations,omitempty"` }