diff --git a/.golangci-kal.yml b/.golangci-kal.yml index 5e0a2ede42..f596eec123 100644 --- a/.golangci-kal.yml +++ b/.golangci-kal.yml @@ -16,7 +16,7 @@ linters: enable: - "commentstart" # Ensure comments start with the serialized version of the field name. - "conditions" # Ensure conditions have the correct json tags and markers. - # - "conflictingmarkers" # Ensure there are no conflicting markers. + - "conflictingmarkers" # Ensure there are no conflicting markers. - "duplicatemarkers" # Ensure there are no exact duplicate markers for types and fields. # - "forbiddenmarkers" # Ensure that types and fields do not contain any markers that are forbidden. - "integers" # Ensure only int32 and int64 are used for integers. diff --git a/api/v1beta2/identity_types.go b/api/v1beta2/identity_types.go index efe0a90627..eaad192f0c 100644 --- a/api/v1beta2/identity_types.go +++ b/api/v1beta2/identity_types.go @@ -23,7 +23,7 @@ type OpenStackIdentityReference struct { // type specifies the identity reference type. Defaults to Secret for backward compatibility. // +kubebuilder:validation:Enum=Secret;ClusterIdentity // +kubebuilder:default=Secret - // +required + // +optional Type string `json:"type,omitempty"` // name is the name of a Secret (type=Secret) in the same namespace as the resource being provisioned, diff --git a/api/v1beta2/types.go b/api/v1beta2/types.go index c7827cb7fb..4e158b6299 100644 --- a/api/v1beta2/types.go +++ b/api/v1beta2/types.go @@ -993,7 +993,7 @@ type APIServerLoadBalancer struct { // API server loadbalancer, omit the APIServerLoadBalancer field in the // cluster spec instead. // - // +required + // +optional // +kubebuilder:default:=true Enabled *bool `json:"enabled,omitempty"` diff --git a/cmd/models-schema/zz_generated.openapi.go b/cmd/models-schema/zz_generated.openapi.go index 2a72ebaf29..99d05bc25b 100644 --- a/cmd/models-schema/zz_generated.openapi.go +++ b/cmd/models-schema/zz_generated.openapi.go @@ -22286,7 +22286,6 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_APIServerLoadBa }, }, }, - Required: []string{"enabled"}, }, }, Dependencies: []string{ @@ -24021,7 +24020,7 @@ func schema_sigsk8sio_cluster_api_provider_openstack_api_v1beta2_OpenStackIdenti }, }, }, - Required: []string{"type", "name", "cloudName"}, + Required: []string{"name", "cloudName"}, }, }, } diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml index 122472ef05..4c043e05d9 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml @@ -3142,8 +3142,6 @@ spec: type: object type: array x-kubernetes-list-type: atomic - required: - - enabled type: object port: description: |- @@ -3358,7 +3356,6 @@ spec: required: - cloudName - name - - type type: object x-kubernetes-validations: - message: region is immutable @@ -4304,7 +4301,6 @@ spec: required: - cloudName - name - - type type: object x-kubernetes-validations: - message: region is immutable diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml index 1118cd81f9..5ae3d12c5a 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml @@ -2591,8 +2591,6 @@ spec: type: object type: array x-kubernetes-list-type: atomic - required: - - enabled type: object port: description: |- @@ -2812,7 +2810,6 @@ spec: required: - cloudName - name - - type type: object x-kubernetes-validations: - message: region is immutable @@ -3781,7 +3778,6 @@ spec: required: - cloudName - name - - type type: object x-kubernetes-validations: - message: region is immutable diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml index de7ac61a3e..86ddc5a29d 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackfloatingippools.yaml @@ -156,7 +156,6 @@ spec: required: - cloudName - name - - type type: object x-kubernetes-validations: - message: region is immutable diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml index b4acab1972..c0110b88ad 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml @@ -1501,7 +1501,6 @@ spec: required: - cloudName - name - - type type: object x-kubernetes-validations: - message: region is immutable diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml index 3f24440170..50d6363f26 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml @@ -1243,7 +1243,6 @@ spec: required: - cloudName - name - - type type: object x-kubernetes-validations: - message: region is immutable diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml index fa0516b61d..f253a0e716 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_openstackservers.yaml @@ -224,7 +224,6 @@ spec: required: - cloudName - name - - type type: object x-kubernetes-validations: - message: region is immutable diff --git a/docs/book/src/api/v1beta2/api.md b/docs/book/src/api/v1beta2/api.md index c4d1e1d5af..b04e8d1eb5 100644 --- a/docs/book/src/api/v1beta2/api.md +++ b/docs/book/src/api/v1beta2/api.md @@ -946,6 +946,7 @@ bool +(Optional)

enabled defines whether a load balancer should be created. This value defaults to true if an APIServerLoadBalancer is given.

There is no reason to set this to false. To disable creation of the @@ -3202,6 +3203,7 @@ string +(Optional)

type specifies the identity reference type. Defaults to Secret for backward compatibility.