From c1a72fe0dde0090c91e94929c5f1c7572ac5fe1d Mon Sep 17 00:00:00 2001 From: rabi Date: Mon, 18 Nov 2024 12:35:47 +0530 Subject: [PATCH] Make ServiceNetwork optional in IPSetReservration jira: https://issues.redhat.com/browse/OSPRH-11679 Signed-off-by: rabi --- apis/bases/network.openstack.org_ipsets.yaml | 1 - apis/network/v1beta1/ipset_types.go | 5 +++-- config/crd/bases/network.openstack.org_ipsets.yaml | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apis/bases/network.openstack.org_ipsets.yaml b/apis/bases/network.openstack.org_ipsets.yaml index cd6c2fc3..d33687ee 100644 --- a/apis/bases/network.openstack.org_ipsets.yaml +++ b/apis/bases/network.openstack.org_ipsets.yaml @@ -195,7 +195,6 @@ spec: - address - dnsDomain - network - - serviceNetwork - subnet type: object type: array diff --git a/apis/network/v1beta1/ipset_types.go b/apis/network/v1beta1/ipset_types.go index 81eb7b51..e412f821 100644 --- a/apis/network/v1beta1/ipset_types.go +++ b/apis/network/v1beta1/ipset_types.go @@ -83,14 +83,15 @@ type IPSetReservation struct { // DNSDomain of the subnet DNSDomain string `json:"dnsDomain"` + // +kubebuilder:validation:Optional // ServiceNetwork mapping - ServiceNetwork ServiceNetNameStr `json:"serviceNetwork"` + ServiceNetwork ServiceNetNameStr `json:"serviceNetwork" optional:"true"` } // IPSetStatus defines the observed state of IPSet type IPSetStatus struct { // Reservation - Reservation []IPSetReservation `json:"reservations,omitempty" optional:"true"` + Reservation []IPSetReservation `json:"reservations,omitempty"` // Conditions Conditions condition.Conditions `json:"conditions,omitempty" optional:"true"` diff --git a/config/crd/bases/network.openstack.org_ipsets.yaml b/config/crd/bases/network.openstack.org_ipsets.yaml index cd6c2fc3..d33687ee 100644 --- a/config/crd/bases/network.openstack.org_ipsets.yaml +++ b/config/crd/bases/network.openstack.org_ipsets.yaml @@ -195,7 +195,6 @@ spec: - address - dnsDomain - network - - serviceNetwork - subnet type: object type: array