diff --git a/charts/kubefed/crds/crds.yaml b/charts/kubefed/crds/crds.yaml index 1ceff9bf19..d347cbe971 100644 --- a/charts/kubefed/crds/crds.yaml +++ b/charts/kubefed/crds/crds.yaml @@ -89,6 +89,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: @@ -219,6 +222,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: @@ -351,6 +357,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: @@ -481,6 +490,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: @@ -609,6 +621,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: @@ -739,6 +754,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: @@ -871,6 +889,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: @@ -999,6 +1020,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: @@ -1129,6 +1153,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: @@ -1259,6 +1286,9 @@ spec: properties: name: type: string + remoteStatus: + type: object + x-kubernetes-preserve-unknown-fields: true status: type: string required: diff --git a/go.mod b/go.mod index c16d658dd8..0a3b464d52 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( github.com/evanphx/json-patch v4.9.0+incompatible github.com/ghodss/yaml v1.0.0 - github.com/go-logr/logr v0.2.1 // indirect + github.com/go-logr/logr v0.3.0 // indirect github.com/go-logr/zapr v0.2.0 // indirect github.com/json-iterator/go v1.1.10 github.com/onsi/ginkgo v1.14.2 @@ -16,6 +16,8 @@ require ( github.com/spf13/cobra v1.1.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.6.1 + go.uber.org/zap v1.16.0 // indirect + golang.org/x/text v0.3.4 // indirect k8s.io/api v0.19.3 k8s.io/apiextensions-apiserver v0.19.3 k8s.io/apimachinery v0.19.3 diff --git a/go.sum b/go.sum index 8d786f2488..da24b91f1f 100644 --- a/go.sum +++ b/go.sum @@ -177,6 +177,8 @@ github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.2.1 h1:fV3MLmabKIZ383XifUjFSwcoGee0v9qgPp8wy5svibE= github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= +github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= @@ -606,10 +608,14 @@ go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -617,6 +623,8 @@ go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -755,6 +763,8 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= diff --git a/pkg/kubefedctl/enable/validation.go b/pkg/kubefedctl/enable/validation.go index 7c97b11aca..5ee4e39366 100644 --- a/pkg/kubefedctl/enable/validation.go +++ b/pkg/kubefedctl/enable/validation.go @@ -215,6 +215,10 @@ func ValidationSchema(specProps v1.JSONSchemaProps) *v1.CustomResourceValidation "status": { Type: "string", }, + "remoteStatus": { + XPreserveUnknownFields: pointer.BoolPtr(true), + Type: "object", + }, }, Required: []string{ "name",