diff --git a/charts/spiderpool/crds/spiderpool.spidernet.io_spiderippools.yaml b/charts/spiderpool/crds/spiderpool.spidernet.io_spiderippools.yaml index 1731f12dec..a43b8b14c5 100644 --- a/charts/spiderpool/crds/spiderpool.spidernet.io_spiderippools.yaml +++ b/charts/spiderpool/crds/spiderpool.spidernet.io_spiderippools.yaml @@ -45,12 +45,12 @@ spec: name: DISABLE priority: 10 type: boolean - - description: disable + - description: nodeName jsonPath: .spec.nodeName name: NodeName priority: 10 type: string - - description: disable + - description: multusName jsonPath: .spec.multusName name: MultusName priority: 10 diff --git a/docs/reference/crd-spiderippool.md b/docs/reference/crd-spiderippool.md index 8a7b455240..11f45cb5ff 100644 --- a/docs/reference/crd-spiderippool.md +++ b/docs/reference/crd-spiderippool.md @@ -35,23 +35,23 @@ spec: This is the IPPool spec for users to configure. -| Field | Description | Schema | Validation | Values | Default | -|-------------------|---------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|------------|------------------------------------------|---------| -| ipVersion | IP version of this pool | int | optional | 4,6 | | -| subnet | subnet of this pool | string | required | IPv4 or IPv6 CIDR.
Must not overlap | | -| 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 | -| routes | custom routes in this pool | 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 | | -| namespaceName | specify which namespaces pods can use this pool | list of strings | optional | | | -| nodeAffinity | specify which nodes 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 | | -| nodeName | specify which nodes pods can use this pool | list of strings | optional | | | -| multusName | specify which multus net-attach-def objects can use this pool | list of strings | optional | | | -| default | configure this resource as a default pool for pods | boolean | optional | true,false | false | -| disable | configure whether the pool is usable | boolean | optional | true,false | false | +| Field | Description | Schema | Validation | Values | Default | +|-------------------|------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|------------|------------------------------------------|---------| +| ipVersion | IP version of this pool | int | optional | 4,6 | | +| subnet | subnet of this pool | string | required | IPv4 or IPv6 CIDR.
Must not overlap | | +| 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 | +| 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 | | +| namespaceName | specify which namespaces pods can use this pool (The priority is higher than property `namespaceAffinity`) | list of strings | optional | | | +| nodeAffinity | specify which nodes 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 | | +| nodeName | specify which nodes pods can use this pool (The priority is higher than property `nodeAffinity`) | list of strings | optional | | | +| multusName | specify which multus net-attach-def objects can use this pool | list of strings | optional | | | +| default | configure this resource as a default pool for pods | boolean | optional | true,false | false | +| disable | configure whether the pool is usable | boolean | optional | true,false | false | ### Status (subresource) diff --git a/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spiderippool_types.go b/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spiderippool_types.go index 34fc06cce6..fed7d83a54 100644 --- a/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spiderippool_types.go +++ b/pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spiderippool_types.go @@ -99,8 +99,8 @@ type PoolIPAllocation struct { // +kubebuilder:printcolumn:JSONPath=".status.totalIPCount",description="totalIPCount",name="TOTAL-IP-COUNT",type=integer // +kubebuilder:printcolumn:JSONPath=".spec.default",description="default",name="DEFAULT",type=boolean // +kubebuilder:printcolumn:JSONPath=".spec.disable",description="disable",name="DISABLE",type=boolean,priority=10 -// +kubebuilder:printcolumn:JSONPath=".spec.nodeName",description="disable",name="NodeName",type=string,priority=10 -// +kubebuilder:printcolumn:JSONPath=".spec.multusName",description="disable",name="MultusName",type=string,priority=10 +// +kubebuilder:printcolumn:JSONPath=".spec.nodeName",description="nodeName",name="NodeName",type=string,priority=10 +// +kubebuilder:printcolumn:JSONPath=".spec.multusName",description="multusName",name="MultusName",type=string,priority=10 // +kubebuilder:printcolumn:JSONPath=`.spec.podAffinity.matchLabels['ipam\.spidernet\.io/app\-namespace']`,description="AppNamespace",name="APP-NAMESPACE",type=string,priority=10 // +kubebuilder:object:root=true // +kubebuilder:subresource:status