Skip to content

Commit

Permalink
Merge pull request spidernet-io#3527 from cyclinder/dra/feature2
Browse files Browse the repository at this point in the history
update crds for spiderpool dra feature
  • Loading branch information
weizhoublue authored Jun 21, 2024
2 parents 13c95f0 + 63f7aa5 commit 5ad1b77
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,13 @@ spec:
spec:
description: ClaimParameterSpec defines the desired state of SpiderClaimParameter.
properties:
ippools:
items:
type: string
type: array
multusNames:
rdmaAcc:
default: false
type: boolean
staticNics:
items:
type: string
type: array
rdma:
default: false
type: boolean
resources:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: ResourceList is a set of (resource name, quantity) pairs.
type: object
type: object
type: object
served: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ spec:
- mode
- name
type: object
enableRdma:
default: false
description: enable share rdma for ipvlan
type: boolean
ippools:
description: SpiderpoolPools could specify the IPAM spiderpool
CNI configuration default IPv4&IPv6 pools.
Expand All @@ -197,6 +201,11 @@ spec:
items:
type: string
type: array
rdmaResourceName:
description: Resource name of the rdma device-plugin, If it's
empty and enableRdma is true, the value will be auto set by
operator. and the user can also set this value manually.
type: string
vlanID:
format: int32
maximum: 4094
Expand All @@ -222,6 +231,10 @@ spec:
- mode
- name
type: object
enableRdma:
default: false
description: enable share rdma for macvlan
type: boolean
ippools:
description: SpiderpoolPools could specify the IPAM spiderpool
CNI configuration default IPv4&IPv6 pools.
Expand All @@ -239,6 +252,11 @@ spec:
items:
type: string
type: array
rdmaResourceName:
description: Resource name of the rdma device-plugin, If it's
empty and enableRdma is true, the value will be auto set by
operator. and the user can also set this value manually.
type: string
vlanID:
format: int32
maximum: 4094
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,17 @@
package v2beta1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// ClaimParameterSpec defines the desired state of SpiderClaimParameter.
type ClaimParameterSpec struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default=false
RdmaAcc bool `json:"rdma,omitempty"`
RdmaAcc bool `json:"rdmaAcc,omitempty"`

// +kubebuilder:validation:Optional
MultusNames []string `json:"multusNames,omitempty"`

// +kubebuilder:validation:Optional
SpiderIPPools []string `json:"ippools,omitempty"`

// +kubebuilder:validation:Optional
Resources corev1.ResourceList `json:"resources,omitempty"`
StaticNics []string `json:"staticNics,omitempty"`
}

// +kubebuilder:resource:categories={spiderpool},path="spiderclaimparameters",scope="Namespaced",shortName={scp},singular="spiderclaimparameter"
Expand Down
22 changes: 22 additions & 0 deletions pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/spidermultus_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ type SpiderMacvlanCniConfig struct {
// +kubebuilder:validation:Optional
Bond *BondConfig `json:"bond,omitempty"`

// +kubebuilder:default=false
// +kubebuilder:validation:Optional
// enable share rdma for macvlan
EnableRdma bool `json:"enableRdma"`

// +kubebuilder:validation:Optional
// Resource name of the rdma device-plugin, If it's empty and enableRdma is true,
// the value will be auto set by operator. and the user can also set this value
// manually.
RdmaResourceName string `json:"rdmaResourceName"`

// +kubebuilder:validation:Optional
SpiderpoolConfigPools *SpiderpoolPools `json:"ippools,omitempty"`
}
Expand All @@ -95,6 +106,17 @@ type SpiderIPvlanCniConfig struct {
// +kubebuilder:validation:Optional
Bond *BondConfig `json:"bond,omitempty"`

// +kubebuilder:default=false
// +kubebuilder:validation:Optional
// enable share rdma for ipvlan
EnableRdma bool `json:"enableRdma"`

// +kubebuilder:validation:Optional
// Resource name of the rdma device-plugin, If it's empty and enableRdma is true,
// the value will be auto set by operator. and the user can also set this value
// manually.
RdmaResourceName string `json:"rdmaResourceName"`

// +kubebuilder:validation:Optional
SpiderpoolConfigPools *SpiderpoolPools `json:"ippools,omitempty"`
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ad1b77

Please sign in to comment.