You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add collisionProtection inheritance hierarchy to ClusterExtensionRevision (operator-framework#2513)
Add collisionProtection as a required field at the spec level and an
optional field at the phase level, with inheritance resolution:
object > phase > spec > default ("Prevent"). This reduces verbosity by
letting users set a single spec-level default instead of repeating the
value on every object.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: helm/olmv1/base/operator-controller/crd/experimental/olm.operatorframework.io_clusterextensionrevisions.yaml
+35-1Lines changed: 35 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,23 @@ spec:
56
56
spec:
57
57
description: spec defines the desired state of the ClusterExtensionRevision.
58
58
properties:
59
+
collisionProtection:
60
+
description: |-
61
+
collisionProtection specifies the default collision protection strategy for all objects
62
+
in this revision. Individual phases or objects can override this value.
63
+
64
+
When set, this value is used as the default for any phase or object that does not
65
+
explicitly specify its own collisionProtection.
66
+
67
+
The resolution order is: object > phase > spec
68
+
enum:
69
+
- Prevent
70
+
- IfNoController
71
+
- None
72
+
type: string
73
+
x-kubernetes-validations:
74
+
- message: collisionProtection is immutable
75
+
rule: self == oldSelf
59
76
lifecycleState:
60
77
description: |-
61
78
lifecycleState specifies the lifecycle state of the ClusterExtensionRevision.
@@ -102,6 +119,21 @@ spec:
102
119
ClusterExtensionRevisionPhase represents a group of objects that are applied together. The phase is considered
103
120
complete only after all objects pass their status probes.
104
121
properties:
122
+
collisionProtection:
123
+
description: |-
124
+
collisionProtection specifies the default collision protection strategy for all objects
125
+
in this phase. Individual objects can override this value.
126
+
127
+
When set, this value is used as the default for any object in this phase that does not
128
+
explicitly specify its own collisionProtection.
129
+
130
+
When omitted, we use .spec.collistionProtection as the default for any object in this phase that does not
131
+
explicitly specify its own collisionProtection.
132
+
enum:
133
+
- Prevent
134
+
- IfNoController
135
+
- None
136
+
type: string
105
137
name:
106
138
description: |-
107
139
name is a required identifier for this phase.
@@ -149,6 +181,8 @@ spec:
149
181
owned by another controller.
150
182
Use this setting with extreme caution as it may cause multiple controllers to fight over
151
183
the same resource, resulting in increased load on the API server and etcd.
184
+
185
+
When omitted, the value is inherited from the phase, then spec.
// sanitizedUnstructured takes an unstructured obj, removes status if present, and returns a sanitized copy containing only the allowed metadata entries set below.
0 commit comments