diff --git a/charts/spiderpool/crds/spiderpool.spidernet.io_spiderendpoints.yaml b/charts/spiderpool/crds/spiderpool.spidernet.io_spiderendpoints.yaml
index f68f473e6b..5fc25788d6 100644
--- a/charts/spiderpool/crds/spiderpool.spidernet.io_spiderendpoints.yaml
+++ b/charts/spiderpool/crds/spiderpool.spidernet.io_spiderendpoints.yaml
@@ -100,7 +100,7 @@ spec:
vlan:
default: 0
format: int64
- maximum: 4095
+ maximum: 4094
minimum: 0
type: integer
required:
diff --git a/docs/reference/crd-spidermultusconfig.md b/docs/reference/crd-spidermultusconfig.md
index 3585141ac5..a7edf28d2e 100644
--- a/docs/reference/crd-spidermultusconfig.md
+++ b/docs/reference/crd-spidermultusconfig.md
@@ -34,40 +34,40 @@ spec:
This is the SpiderReservedIP spec for users to configure.
-| Field | Description | Schema | Validation | Values | Default |
-|-------------------|---------------------------------------------------|--------------------------------------------------------------------------|------------|-----------------------------|---------|
-| cniType | expected main CNI type | string | require | macvlan,ipvlan,sriov,custom | |
+| Field | Description | Schema | Validation | Values | Default |
+|-------------------|---------------------------------------------------|------------------------------------------------------------------------------|------------|-----------------------------|---------|
+| cniType | expected main CNI type | string | require | macvlan,ipvlan,sriov,custom | |
| macvlan | macvlan CNI configuration | [SpiderMacvlanCniConfig](./crd-spidermultusconfig.md#SpiderMacvlanCniConfig) | optional | | |
| ipvlan | ipvlan CNI configuration | [SpiderIPvlanCniConfig](./crd-spidermultusconfig.md#SpiderIPvlanCniConfig) | optional | | |
| sriov | sriov CNI configuration | [SpiderSRIOVCniConfig](./crd-spidermultusconfig.md#SpiderSRIOVCniConfig) | optional | | |
-| enableCoordinator | enable coordinator or not | boolean | optional | true,false | true |
-| coordinator | coordinator CNI configuration | CoordinatorSpec | optional | | |
-| customCNI | a string that represents custom CNI configuration | string | optional | | |
+| enableCoordinator | enable coordinator or not | boolean | optional | true,false | true |
+| coordinator | coordinator CNI configuration | CoordinatorSpec | optional | | |
+| customCNI | a string that represents custom CNI configuration | string | optional | | |
#### SpiderMacvlanCniConfig
-| Field | Description | Schema | Validation | Values |
-|---------|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|------------|----------|
-| master | the Interfaces on your master, you could specify a single one Interface
or multiple Interfaces to generate one bond Interface | list of strings | required | |
-| vlanID | vlan ID | int | optional | [0,4095] |
+| Field | Description | Schema | Validation | Values |
+|---------|------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|------------|----------|
+| master | the Interfaces on your master, you could specify a single one Interface
or multiple Interfaces to generate one bond Interface | list of strings | required | |
+| vlanID | vlan ID | int | optional | [0,4094] |
| bond | expected bond Interface configurations | [BondConfig](./crd-spidermultusconfig.md#BondConfig) | optional | |
| ippools | the default IPPools in your CNI configurations | [SpiderpoolPools](./crd-spidermultusconfig.md#SpiderpoolPools) | optional | |
#### SpiderIPvlanCniConfig
-| Field | Description | Schema | Validation | Values |
-|---------|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|------------|----------|
-| master | the Interfaces on your master, you could specify a single one Interface
or multiple Interfaces to generate one bond Interface | list of strings | required | |
-| vlanID | vlan ID | int | optional | [0,4095] |
+| Field | Description | Schema | Validation | Values |
+|---------|------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|------------|----------|
+| master | the Interfaces on your master, you could specify a single one Interface
or multiple Interfaces to generate one bond Interface | list of strings | required | |
+| vlanID | vlan ID | int | optional | [0,4094] |
| bond | expected bond Interface configurations | [BondConfig](./crd-spidermultusconfig.md#BondConfig) | optional | |
| ippools | the default IPPools in your CNI configurations | [SpiderpoolPools](./crd-spidermultusconfig.md#SpiderpoolPools) | optional | |
#### SpiderSRIOVCniConfig
-| Field | Description | Schema | Validation |
-|--------------|-------------------------------------------------------------------------------------------|------------------------------------------------------------|------------|
-| resourceName | this property will create an annotation for Multus net-attach-def to cooperate with SRIOV | string | required |
-| vlanID | vlan ID | int | optional |
+| Field | Description | Schema | Validation |
+|--------------|-------------------------------------------------------------------------------------------|----------------------------------------------------------------|------------|
+| resourceName | this property will create an annotation for Multus net-attach-def to cooperate with SRIOV | string | required |
+| vlanID | vlan ID | int | optional |
| ippools | the default IPPools in your CNI configurations | [SpiderpoolPools](./crd-spidermultusconfig.md#SpiderpoolPools) | optional |
#### BondConfig
diff --git a/docs/reference/crd-spidersubnet.md b/docs/reference/crd-spidersubnet.md
index 25b393cacb..48e7a5b79b 100644
--- a/docs/reference/crd-spidersubnet.md
+++ b/docs/reference/crd-spidersubnet.md
@@ -40,7 +40,7 @@ This is the SpiderSubnet spec for users to configure.
| ips | IP ranges for this resource to use | list of strings | optional | array of IP ranges and single IP address | |
| excludeIPs | isolated IP ranges for this resource to filter | list of strings | optional | array of IP ranges and single IP address | |
| gateway | gateway for this resource | string | optional | an IP address | |
-| vlan | vlan ID | int | optional | [0,4095] | 0 |
+| vlan | vlan ID | int | optional | [0,4094] | 0 |
| routes | custom routes in this resource | list of [Route](./crd-spiderippool.md#Route) | optional | | |
### Status (subresource)
diff --git a/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spiderendpoint_types.go b/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spiderendpoint_types.go
index 6b9e4b27cf..e8da2ab408 100644
--- a/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spiderendpoint_types.go
+++ b/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spiderendpoint_types.go
@@ -47,7 +47,7 @@ type IPAllocationDetail struct {
IPv6Pool *string `json:"ipv6Pool,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/test/e2e/subnet/subnet_test.go b/test/e2e/subnet/subnet_test.go
index b9de578b45..7cbbe9d48f 100644
--- a/test/e2e/subnet/subnet_test.go
+++ b/test/e2e/subnet/subnet_test.go
@@ -514,7 +514,7 @@ var _ = Describe("test subnet", Label("subnet"), func() {
subnetAnno := types.AnnoSubnetItem{}
if frame.Info.IpV4Enabled {
*v4Ipversion = int64(4)
- if i, err := strconv.Atoi(common.GenerateRandomNumber(4095)); err != nil {
+ if i, err := strconv.Atoi(common.GenerateRandomNumber(4094)); err != nil {
*ipv4Vlan = int64(i)
}
subnetAnno.IPv4 = []string{v4SubnetName}
@@ -541,7 +541,7 @@ var _ = Describe("test subnet", Label("subnet"), func() {
if frame.Info.IpV6Enabled {
*v6Ipversion = int64(6)
- if i, err := strconv.Atoi(common.GenerateRandomNumber(4095)); err != nil {
+ if i, err := strconv.Atoi(common.GenerateRandomNumber(4094)); err != nil {
*ipv6Vlan = int64(i)
}
subnetAnno.IPv6 = []string{v6SubnetName}