Skip to content

Commit bf7e39f

Browse files
perdasilvaPer Goncalves da Silva
andauthored
Add enum validation annotation to CollisionProtection (#2334)
Signed-off-by: Per Goncalves da Silva <[email protected]> Co-authored-by: Per Goncalves da Silva <[email protected]>
1 parent e20c9bc commit bf7e39f

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

api/v1/clusterextensionrevision_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ type ClusterExtensionRevisionObject struct {
108108
// already existing on the cluster or even owned by another controller.
109109
//
110110
// +kubebuilder:default="Prevent"
111+
// +kubebuilder:validation:Enum=Prevent;IfNoController;None
111112
// +optional
112113
CollisionProtection CollisionProtection `json:"collisionProtection,omitempty"`
113114
}

helm/olmv1/base/operator-controller/crd/experimental/olm.operatorframework.io_clusterextensionrevisions.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ spec:
8787
description: |-
8888
CollisionProtection controls whether OLM can adopt and modify objects
8989
already existing on the cluster or even owned by another controller.
90+
enum:
91+
- Prevent
92+
- IfNoController
93+
- None
9094
type: string
9195
object:
9296
type: object

manifests/experimental-e2e.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,10 @@ spec:
678678
description: |-
679679
CollisionProtection controls whether OLM can adopt and modify objects
680680
already existing on the cluster or even owned by another controller.
681+
enum:
682+
- Prevent
683+
- IfNoController
684+
- None
681685
type: string
682686
object:
683687
type: object

manifests/experimental.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,10 @@ spec:
643643
description: |-
644644
CollisionProtection controls whether OLM can adopt and modify objects
645645
already existing on the cluster or even owned by another controller.
646+
enum:
647+
- Prevent
648+
- IfNoController
649+
- None
646650
type: string
647651
object:
648652
type: object

0 commit comments

Comments
 (0)