From 31307a31802b72d785c89c0386daa95fe4149d19 Mon Sep 17 00:00:00 2001 From: Icarus9913 Date: Mon, 31 Jul 2023 15:56:24 +0800 Subject: [PATCH] fix SpiderSubnet CRD vlanID (#2117) Signed-off-by: Icarus9913 --- .../crds/spiderpool.spidernet.io_spidersubnets.yaml | 2 +- .../spiderpool.spidernet.io/v2beta1/spidersubnet_types.go | 2 +- .../spiderpool.spidernet.io/v2beta1/zz_generated.deepcopy.go | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/charts/spiderpool/crds/spiderpool.spidernet.io_spidersubnets.yaml b/charts/spiderpool/crds/spiderpool.spidernet.io_spidersubnets.yaml index ad14eb68cf..7c4252b98f 100644 --- a/charts/spiderpool/crds/spiderpool.spidernet.io_spidersubnets.yaml +++ b/charts/spiderpool/crds/spiderpool.spidernet.io_spidersubnets.yaml @@ -89,7 +89,7 @@ spec: vlan: default: 0 format: int64 - maximum: 4095 + maximum: 4094 minimum: 0 type: integer required: diff --git a/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spidersubnet_types.go b/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spidersubnet_types.go index ad9fd01cd4..e07df21721 100644 --- a/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spidersubnet_types.go +++ b/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spidersubnet_types.go @@ -26,7 +26,7 @@ type SubnetSpec struct { Gateway *string `json:"gateway,omitempty"` // +kubebuilder:default=0 - // +kubebuilder:validation:Maximum=4095 + // +kubebuilder:validation:Maximum=4094 // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Optional Vlan *int64 `json:"vlan,omitempty"` diff --git a/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/zz_generated.deepcopy.go b/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/zz_generated.deepcopy.go index 0a232b2a52..a71d247e30 100644 --- a/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/zz_generated.deepcopy.go +++ b/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/zz_generated.deepcopy.go @@ -41,6 +41,11 @@ func (in *CoordinatorSpec) DeepCopyInto(out *CoordinatorSpec) { *out = new(string) **out = **in } + if in.PodCIDRType != nil { + in, out := &in.PodCIDRType, &out.PodCIDRType + *out = new(string) + **out = **in + } if in.HijackCIDR != nil { in, out := &in.HijackCIDR, &out.HijackCIDR *out = make([]string, len(*in))