diff --git a/config/crds/iam.kubesphere.io_rolebases.yaml b/config/crds/iam.kubesphere.io_rolebases.yaml index 35183c630..8b70b38ad 100644 --- a/config/crds/iam.kubesphere.io_rolebases.yaml +++ b/config/crds/iam.kubesphere.io_rolebases.yaml @@ -32,6 +32,8 @@ spec: type: object role: type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true required: - role type: object diff --git a/config/crds/tenant.kubesphere.io_workspacetemplates.yaml b/config/crds/tenant.kubesphere.io_workspacetemplates.yaml index a7450d006..9502a4101 100644 --- a/config/crds/tenant.kubesphere.io_workspacetemplates.yaml +++ b/config/crds/tenant.kubesphere.io_workspacetemplates.yaml @@ -47,6 +47,7 @@ spec: type: string value: type: object + x-kubernetes-preserve-unknown-fields: true required: - path type: object diff --git a/staging/src/kubesphere.io/api/iam/v1alpha2/types.go b/staging/src/kubesphere.io/api/iam/v1alpha2/types.go index 8243641bb..d5167698b 100644 --- a/staging/src/kubesphere.io/api/iam/v1alpha2/types.go +++ b/staging/src/kubesphere.io/api/iam/v1alpha2/types.go @@ -283,7 +283,8 @@ type WorkspaceRoleBindingList struct { type RoleBase struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:EmbeddedResource Role runtime.RawExtension `json:"role"` } diff --git a/staging/src/kubesphere.io/api/types/v1beta1/types.go b/staging/src/kubesphere.io/api/types/v1beta1/types.go index 30379b0e2..4b1786e60 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/types.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/types.go @@ -44,8 +44,9 @@ type GenericPlacement struct { } type ClusterOverride struct { - Op string `json:"op,omitempty"` - Path string `json:"path"` + Op string `json:"op,omitempty"` + Path string `json:"path"` + // +kubebuilder:pruning:PreserveUnknownFields Value runtime.RawExtension `json:"value,omitempty"` }