From 9738a8a7b8fa6e7dd67dd126a6bc49c865246f76 Mon Sep 17 00:00:00 2001 From: Xie Zheng Date: Wed, 22 Nov 2023 11:00:58 +0800 Subject: [PATCH] Add back enum validation for IPPool When running `make test`, the generated nsx.vmware.com_ippools.yaml is different from the current one, the CRD definition misses validation. --- pkg/apis/v1alpha2/ippool_types.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/apis/v1alpha2/ippool_types.go b/pkg/apis/v1alpha2/ippool_types.go index 2d629259f..469dc43ef 100644 --- a/pkg/apis/v1alpha2/ippool_types.go +++ b/pkg/apis/v1alpha2/ippool_types.go @@ -37,6 +37,7 @@ type IPPoolList struct { // IPPoolSpec defines the desired state of IPPool. type IPPoolSpec struct { // Type defines the type of this IPPool, Public or Private. + // +kubebuilder:validation:Enum=Public;Private // +optional Type string `json:"type,omitempty"` // Subnets defines set of subnets need to be allocated.