Skip to content

Commit 39832d0

Browse files
authored
set value of csvInjector enable to true in nss CR (#187)
* set value of csvInjector enable to true Signed-off-by: YCShen1010 <[email protected]> * set csvInjector enable to true by default Signed-off-by: YCShen1010 <[email protected]> Signed-off-by: YCShen1010 <[email protected]>
1 parent 3bc5b12 commit 39832d0

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

api/v1/namespacescope_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ type NamespaceScopeSpec struct {
4141
ManualManagement bool `json:"manualManagement,omitempty"`
4242

4343
// When CSVInjector is enabled, operator will inject the watch namespace list into operator csv.
44+
// +kubebuilder:default:={enable:true}
4445
CSVInjector CSVInjector `json:"csvInjector,omitempty"`
4546
}
4647

4748
// CSVInjector manages if operator will insert labels and WATCH_NAMESPACES in CSV automatically
4849
type CSVInjector struct {
49-
// +kubebuilder:default:=true
5050
Enable bool `json:"enable"`
5151
}
5252

@@ -67,6 +67,7 @@ type NamespaceScope struct {
6767
metav1.TypeMeta `json:",inline"`
6868
metav1.ObjectMeta `json:"metadata,omitempty"`
6969

70+
// +kubebuilder:pruning:PreserveUnknownFields
7071
Spec NamespaceScopeSpec `json:"spec,omitempty"`
7172
Status NamespaceScopeStatus `json:"status,omitempty"`
7273
}

bundle-restricted/manifests/operator.ibm.com_namespacescopes.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ spec:
3434
metadata:
3535
type: object
3636
spec:
37-
x-kubernetes-preserve-unknown-fields: true
3837
description: NamespaceScopeSpec defines the desired state of NamespaceScope
3938
properties:
4039
configmapName:
4140
description: ConfigMap name that will contain the list of namespaces
4241
to be watched
4342
type: string
4443
csvInjector:
44+
default:
45+
enable: true
4546
description: When CSVInjector is enabled, operator will inject the
4647
watch namespace list into operator csv.
4748
properties:
4849
enable:
49-
default: true
5050
type: boolean
5151
required:
5252
- enable
@@ -76,6 +76,7 @@ spec:
7676
type: string
7777
type: array
7878
type: object
79+
x-kubernetes-preserve-unknown-fields: true
7980
status:
8081
description: NamespaceScopeStatus defines the observed state of NamespaceScope
8182
properties:

bundle/manifests/operator.ibm.com_namespacescopes.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ spec:
3434
metadata:
3535
type: object
3636
spec:
37-
x-kubernetes-preserve-unknown-fields: true
3837
description: NamespaceScopeSpec defines the desired state of NamespaceScope
3938
properties:
4039
configmapName:
4140
description: ConfigMap name that will contain the list of namespaces
4241
to be watched
4342
type: string
4443
csvInjector:
44+
default:
45+
enable: true
4546
description: When CSVInjector is enabled, operator will inject the
4647
watch namespace list into operator csv.
4748
properties:
4849
enable:
49-
default: true
5050
type: boolean
5151
required:
5252
- enable
@@ -76,6 +76,7 @@ spec:
7676
type: string
7777
type: array
7878
type: object
79+
x-kubernetes-preserve-unknown-fields: true
7980
status:
8081
description: NamespaceScopeStatus defines the observed state of NamespaceScope
8182
properties:

config/crd/bases/operator.ibm.com_namespacescopes.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ spec:
3232
metadata:
3333
type: object
3434
spec:
35-
x-kubernetes-preserve-unknown-fields: true
3635
description: NamespaceScopeSpec defines the desired state of NamespaceScope
3736
properties:
3837
configmapName:
3938
description: ConfigMap name that will contain the list of namespaces to be watched
4039
type: string
4140
csvInjector:
41+
default:
42+
enable: true
4243
description: When CSVInjector is enabled, operator will inject the watch namespace list into operator csv.
4344
properties:
4445
enable:
45-
default: true
4646
type: boolean
4747
required:
4848
- enable
@@ -66,6 +66,7 @@ spec:
6666
type: string
6767
type: array
6868
type: object
69+
x-kubernetes-preserve-unknown-fields: true
6970
status:
7071
description: NamespaceScopeStatus defines the observed state of NamespaceScope
7172
properties:

0 commit comments

Comments
 (0)