diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..e3bbc3d212 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Unreleased + - [#698](https://github.com/kubernetes-sigs/federation-v2/pull/698) - + Fix the generated CRD schema of scalable resources to define the + `retainReplicas` of type `boolean` rather than the invalid type + `bool`. diff --git a/charts/federation-v2/templates/crds.yaml b/charts/federation-v2/templates/crds.yaml index 4a09452907..254d90e5ef 100644 --- a/charts/federation-v2/templates/crds.yaml +++ b/charts/federation-v2/templates/crds.yaml @@ -561,7 +561,7 @@ spec: type: object type: object retainReplicas: - type: bool + type: boolean template: properties: apiVersion: @@ -5405,7 +5405,7 @@ spec: type: object type: object retainReplicas: - type: bool + type: boolean template: properties: apiVersion: diff --git a/pkg/kubefed2/enable/validation.go b/pkg/kubefed2/enable/validation.go index 802106c914..fc8d616aa6 100644 --- a/pkg/kubefed2/enable/validation.go +++ b/pkg/kubefed2/enable/validation.go @@ -146,7 +146,7 @@ func federatedTypeValidationSchema(templateSchema map[string]v1beta1.JSONSchemaP if replicasField, ok := templateSpec.Properties["replicas"]; ok { if replicasField.Type == "integer" && replicasField.Format == "int32" { specProperties[util.RetainReplicasField] = v1beta1.JSONSchemaProps{ - Type: "bool", + Type: "boolean", } } }