Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
Signed-off-by: Icarus9913 <[email protected]>
  • Loading branch information
Icarus9913 committed Aug 9, 2023
1 parent 71c15e0 commit 518bee6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions docs/reference/crd-spiderippool.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br/>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.<br/>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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 518bee6

Please sign in to comment.