From f3b0798e235144bb6830b79bf156612764f23017 Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Tue, 25 Feb 2025 09:06:24 +0100 Subject: [PATCH] Fix ListsMustHaveSSATags raised by crd-schema-checker In openstack-operator, where we bump all the sub components CRDs, we currently get an error thrown by crd-schema-checker: ``` ERROR: "ListsMustHaveSSATags": crd/openstackcontrolplanes.core.openstack.org version/v1beta1 field/^.spec.designate.template.designateUnbound.override.services[*].spec.loadBalancerSourceRanges must set x-kubernetes-list-type ERROR: "ListsMustHaveSSATags": crd/openstackcontrolplanes.core.openstack.org version/v1beta1 field/^.spec.designate.template.designateMdns.override.services[*].spec.loadBalancerSourceRanges must set x-kubernetes-list-type ERROR: "ListsMustHaveSSATags": crd/openstackcontrolplanes.core.openstack.org version/v1beta1 field/^.spec.designate.template.designateBackendbind9.override.services[*].spec.loadBalancerSourceRanges must set x-kubernetes-list-type ``` I assume we hit this error with designate because is the first occurrence in the yaml `CRD`, but it's valid everywhere. This patch adds the `listType` to `LoadBalancerSourceRanges` to make the check happy [1]. [1] https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/555-server-side-apply/README.md#lists Signed-off-by: Francesco Pantano --- modules/common/service/types.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/common/service/types.go b/modules/common/service/types.go index 642851cf..9cdd30ed 100644 --- a/modules/common/service/types.go +++ b/modules/common/service/types.go @@ -215,6 +215,7 @@ type OverrideServiceSpec struct { // cloud-provider does not support the feature." // More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ // +optional + // +listType=atomic LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"` // externalName is the external reference that discovery mechanisms will