From b05ef6714c54cea4443b6e3bf65feba2e3b469e7 Mon Sep 17 00:00:00 2001 From: "Roland.Ma" Date: Fri, 23 Apr 2021 10:41:29 +0000 Subject: [PATCH] fix ClusterOverride field Signed-off-by: Roland.Ma --- config/crds/tenant.kubesphere.io_workspacetemplates.yaml | 1 + staging/src/kubesphere.io/api/types/v1beta1/types.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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/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"` }