Skip to content

Commit 30e66e3

Browse files
authored
use marker to annotate presered unnknown field (#197)
Signed-off-by: YCShen1010 <[email protected]> Signed-off-by: YCShen1010 <[email protected]>
1 parent 09a218d commit 30e66e3

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

api/v1/namespacescope_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ 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:
@@ -76,6 +75,7 @@ spec:
7675
type: string
7776
type: array
7877
type: object
78+
x-kubernetes-preserve-unknown-fields: true
7979
status:
8080
description: NamespaceScopeStatus defines the observed state of NamespaceScope
8181
properties:

bundle/manifests/operator.ibm.com_namespacescopes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ 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:
@@ -76,6 +75,7 @@ spec:
7675
type: string
7776
type: array
7877
type: object
78+
x-kubernetes-preserve-unknown-fields: true
7979
status:
8080
description: NamespaceScopeStatus defines the observed state of NamespaceScope
8181
properties:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ 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:
@@ -66,6 +65,7 @@ spec:
6665
type: string
6766
type: array
6867
type: object
68+
x-kubernetes-preserve-unknown-fields: true
6969
status:
7070
description: NamespaceScopeStatus defines the observed state of NamespaceScope
7171
properties:

0 commit comments

Comments
 (0)