diff --git a/config/crd/projectcalico.org_ipreservations.yaml b/config/crd/projectcalico.org_ipreservations.yaml index 19f44a1..46d8d70 100644 --- a/config/crd/projectcalico.org_ipreservations.yaml +++ b/config/crd/projectcalico.org_ipreservations.yaml @@ -27,8 +27,8 @@ spec: spec: properties: reservedCIDRs: - format: cidr items: + format: cidr type: string type: array x-kubernetes-list-type: set diff --git a/pkg/apis/projectcalico/v3/ipreservation.go b/pkg/apis/projectcalico/v3/ipreservation.go index 70ada9b..2608df5 100644 --- a/pkg/apis/projectcalico/v3/ipreservation.go +++ b/pkg/apis/projectcalico/v3/ipreservation.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017, 2021 Tigera, Inc. All rights reserved. +// Copyright (c) 2017-2026 Tigera, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -56,7 +56,7 @@ type IPReservation struct { type IPReservationSpec struct { // ReservedCIDRs is a list of CIDRs and/or IP addresses that Calico IPAM will exclude from new allocations. // +listType=set - // +kubebuilder:validation:Format=cidr + // +kubebuilder:validation:items:Format=cidr ReservedCIDRs []string `json:"reservedCIDRs,omitempty" validate:"cidrs,omitempty"` }