From 2ce214976c4ecc712398bc2cf300846be386ebc6 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Mon, 7 Oct 2024 10:28:58 +0200 Subject: [PATCH] Make Type in ClusterClass variable schema optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- api/v1beta1/clusterclass_types.go | 3 ++- api/v1beta1/zz_generated.openapi.go | 2 -- config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml | 4 ---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/api/v1beta1/clusterclass_types.go b/api/v1beta1/clusterclass_types.go index c72063293434..3f07614506df 100644 --- a/api/v1beta1/clusterclass_types.go +++ b/api/v1beta1/clusterclass_types.go @@ -450,7 +450,8 @@ type JSONSchemaProps struct { // Type is the type of the variable. // Valid values are: object, array, string, integer, number or boolean. - Type string `json:"type"` + // +optional + Type string `json:"type,omitempty"` // Properties specifies fields of an object. // NOTE: Can only be set if type is object. diff --git a/api/v1beta1/zz_generated.openapi.go b/api/v1beta1/zz_generated.openapi.go index bca631f79d4f..354cbbf9873d 100644 --- a/api/v1beta1/zz_generated.openapi.go +++ b/api/v1beta1/zz_generated.openapi.go @@ -1551,7 +1551,6 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen "type": { SchemaProps: spec.SchemaProps{ Description: "Type is the type of the variable. Valid values are: object, array, string, integer, number or boolean.", - Default: "", Type: []string{"string"}, Format: "", }, @@ -1799,7 +1798,6 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_JSONSchemaProps(ref common.Referen }, }, }, - Required: []string{"type"}, }, }, Dependencies: []string{ diff --git a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml index 97f8fbfe4331..d85b3c064855 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml @@ -1336,8 +1336,6 @@ spec: (scope and select) variables. type: object type: object - required: - - type type: object required: - openAPIV3Schema @@ -2500,8 +2498,6 @@ spec: (scope and select) variables. type: object type: object - required: - - type type: object required: - openAPIV3Schema