Skip to content

Commit

Permalink
Merge pull request spidernet-io#2493 from Icarus9913/feat/wk/deprecat…
Browse files Browse the repository at this point in the history
…ed-crd-property

deprecate IPPool/Subnet CRD vlan property
  • Loading branch information
weizhoublue authored Oct 31, 2023
2 parents 619bc44 + a2e6b9b commit 3e6f146
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ spec:
type: string
vlan:
default: 0
description: 'DEPRECATED: Vlan is deprecated.'
format: int64
maximum: 4094
minimum: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ spec:
type: string
vlan:
default: 0
description: 'DEPRECATED: Vlan is deprecated.'
format: int64
maximum: 4094
minimum: 0
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/crd-spiderippool.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This is the IPPool spec for users to configure.
| ips | IP ranges for this pool to use | list of strings | optional | array of IP ranges and single IP address | |
| excludeIPs | isolated IP ranges for this pool to filter | list of strings | optional | array of IP ranges and single IP address | |
| gateway | gateway for this pool | string | optional | an IP address | |
| vlan | vlan ID | int | optional | [0,4094] | 0 |
| vlan | vlan ID(deprecated) | int | optional | [0,4094] | 0 |
| routes | custom routes in this pool (please don't set default route `0.0.0.0/0` if property `gateway` exists) | list of [route](./crd-spiderippool.md#Route) | optional | | |
| podAffinity | specify which pods can use this pool | [labelSelector](https://github.com/kubernetes/kubernetes/blob/v1.27.0/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go#L1195) | optional | kubernetes LabelSelector | |
| namespaceAffinity | specify which namespaces pods can use this pool | [labelSelector](https://github.com/kubernetes/kubernetes/blob/v1.27.0/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go#L1195) | optional | kubernetes LabelSelector | |
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/crd-spidersubnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,4094] | 0 |
| vlan | vlan ID(deprecated) | int | optional | [0,4094] | 0 |
| routes | custom routes in this resource | list of [Route](./crd-spiderippool.md#Route) | optional | | |
### Status (subresource)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type IPPoolSpec struct {
// +kubebuilder:validation:Optional
Gateway *string `json:"gateway,omitempty"`

// DEPRECATED: Vlan is deprecated.
// +kubebuilder:default=0
// +kubebuilder:validation:Maximum=4094
// +kubebuilder:validation:Minimum=0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type SubnetSpec struct {
// +kubebuilder:validation:Optional
Gateway *string `json:"gateway,omitempty"`

// DEPRECATED: Vlan is deprecated.
// +kubebuilder:default=0
// +kubebuilder:validation:Maximum=4094
// +kubebuilder:validation:Minimum=0
Expand Down

0 comments on commit 3e6f146

Please sign in to comment.