Skip to content

Commit 41f1593

Browse files
authored
fix: make installNamespace immutable (#966)
Signed-off-by: Joe Lanford <[email protected]>
1 parent ed4e40e commit 41f1593

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

api/v1alpha1/clusterextension_types.go

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ type ClusterExtensionSpec struct {
7373

7474
//+kubebuilder:validation:Pattern:=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
7575
//+kubebuilder:validation:MaxLength:=63
76+
//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="installNamespace is immutable"
7677
//
7778
// installNamespace is the namespace where the bundle should be installed. However, note that
7879
// the bundle may contain resources that are cluster-scoped or that are

config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ spec:
5252
maxLength: 63
5353
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
5454
type: string
55+
x-kubernetes-validations:
56+
- message: installNamespace is immutable
57+
rule: self == oldSelf
5558
packageName:
5659
maxLength: 48
5760
pattern: ^[a-z0-9]+(-[a-z0-9]+)*$

0 commit comments

Comments
 (0)