Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
chore: preserve unknown fields
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Fernandez <[email protected]>
  • Loading branch information
Hector Fernandez committed Dec 6, 2020
1 parent 154d5f6 commit 1ea9fac
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
30 changes: 30 additions & 0 deletions charts/kubefed/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down Expand Up @@ -219,6 +222,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down Expand Up @@ -351,6 +357,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down Expand Up @@ -481,6 +490,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down Expand Up @@ -609,6 +621,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down Expand Up @@ -739,6 +754,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down Expand Up @@ -871,6 +889,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down Expand Up @@ -999,6 +1020,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down Expand Up @@ -1129,6 +1153,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down Expand Up @@ -1259,6 +1286,9 @@ spec:
properties:
name:
type: string
remoteStatus:
type: object
x-kubernetes-preserve-unknown-fields: true
status:
type: string
required:
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -606,17 +608,23 @@ 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=
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=
Expand Down Expand Up @@ -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=
Expand Down
4 changes: 4 additions & 0 deletions pkg/kubefedctl/enable/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ func ValidationSchema(specProps v1.JSONSchemaProps) *v1.CustomResourceValidation
"status": {
Type: "string",
},
"remoteStatus": {
XPreserveUnknownFields: pointer.BoolPtr(true),
Type: "object",
},
},
Required: []string{
"name",
Expand Down

0 comments on commit 1ea9fac

Please sign in to comment.