Skip to content

Commit 86b9bd1

Browse files
committed
Add tolerations support to operator and plugin CRDs
Signed-off-by: Tuomas Katila <[email protected]>
1 parent 7d00cf0 commit 86b9bd1

31 files changed

+726
-7
lines changed

deployments/operator/crd/bases/deviceplugin.intel.com_dlbdeviceplugins.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,45 @@ spec:
7272
description: NodeSelector provides a simple way to constrain device
7373
plugin pods to nodes with particular labels.
7474
type: object
75+
tolerations:
76+
description: Tolerations for the plugin Pod
77+
items:
78+
description: |-
79+
The pod this Toleration is attached to tolerates any taint that matches
80+
the triple <key,value,effect> using the matching operator <operator>.
81+
properties:
82+
effect:
83+
description: |-
84+
Effect indicates the taint effect to match. Empty means match all taint effects.
85+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
86+
type: string
87+
key:
88+
description: |-
89+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
90+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
91+
type: string
92+
operator:
93+
description: |-
94+
Operator represents a key's relationship to the value.
95+
Valid operators are Exists and Equal. Defaults to Equal.
96+
Exists is equivalent to wildcard for value, so that a pod can
97+
tolerate all taints of a particular category.
98+
type: string
99+
tolerationSeconds:
100+
description: |-
101+
TolerationSeconds represents the period of time the toleration (which must be
102+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
103+
it is not set, which means tolerate the taint forever (do not evict). Zero and
104+
negative values will be treated as 0 (evict immediately) by the system.
105+
format: int64
106+
type: integer
107+
value:
108+
description: |-
109+
Value is the taint value the toleration matches to.
110+
If the operator is Exists, the value should be empty, otherwise just a regular string.
111+
type: string
112+
type: object
113+
type: array
75114
type: object
76115
status:
77116
description: DlbDevicePluginStatus defines the observed state of DlbDevicePlugin.

deployments/operator/crd/bases/deviceplugin.intel.com_dsadeviceplugins.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,45 @@ spec:
8282
the same DSA device.
8383
minimum: 1
8484
type: integer
85+
tolerations:
86+
description: Tolerations for the plugin Pod
87+
items:
88+
description: |-
89+
The pod this Toleration is attached to tolerates any taint that matches
90+
the triple <key,value,effect> using the matching operator <operator>.
91+
properties:
92+
effect:
93+
description: |-
94+
Effect indicates the taint effect to match. Empty means match all taint effects.
95+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
96+
type: string
97+
key:
98+
description: |-
99+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
100+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
101+
type: string
102+
operator:
103+
description: |-
104+
Operator represents a key's relationship to the value.
105+
Valid operators are Exists and Equal. Defaults to Equal.
106+
Exists is equivalent to wildcard for value, so that a pod can
107+
tolerate all taints of a particular category.
108+
type: string
109+
tolerationSeconds:
110+
description: |-
111+
TolerationSeconds represents the period of time the toleration (which must be
112+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
113+
it is not set, which means tolerate the taint forever (do not evict). Zero and
114+
negative values will be treated as 0 (evict immediately) by the system.
115+
format: int64
116+
type: integer
117+
value:
118+
description: |-
119+
Value is the taint value the toleration matches to.
120+
If the operator is Exists, the value should be empty, otherwise just a regular string.
121+
type: string
122+
type: object
123+
type: array
85124
type: object
86125
status:
87126
description: DsaDevicePluginStatus defines the observed state of DsaDevicePlugin.

deployments/operator/crd/bases/deviceplugin.intel.com_fpgadeviceplugins.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,45 @@ spec:
7979
description: NodeSelector provides a simple way to constrain device
8080
plugin pods to nodes with particular labels.
8181
type: object
82+
tolerations:
83+
description: Tolerations for the plugin Pod
84+
items:
85+
description: |-
86+
The pod this Toleration is attached to tolerates any taint that matches
87+
the triple <key,value,effect> using the matching operator <operator>.
88+
properties:
89+
effect:
90+
description: |-
91+
Effect indicates the taint effect to match. Empty means match all taint effects.
92+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
93+
type: string
94+
key:
95+
description: |-
96+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
97+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
98+
type: string
99+
operator:
100+
description: |-
101+
Operator represents a key's relationship to the value.
102+
Valid operators are Exists and Equal. Defaults to Equal.
103+
Exists is equivalent to wildcard for value, so that a pod can
104+
tolerate all taints of a particular category.
105+
type: string
106+
tolerationSeconds:
107+
description: |-
108+
TolerationSeconds represents the period of time the toleration (which must be
109+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
110+
it is not set, which means tolerate the taint forever (do not evict). Zero and
111+
negative values will be treated as 0 (evict immediately) by the system.
112+
format: int64
113+
type: integer
114+
value:
115+
description: |-
116+
Value is the taint value the toleration matches to.
117+
If the operator is Exists, the value should be empty, otherwise just a regular string.
118+
type: string
119+
type: object
120+
type: array
82121
type: object
83122
status:
84123
description: FpgaDevicePluginStatus defines the observed state of FpgaDevicePlugin.

deployments/operator/crd/bases/deviceplugin.intel.com_gpudeviceplugins.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,45 @@ spec:
9696
the same GPU device.
9797
minimum: 1
9898
type: integer
99+
tolerations:
100+
description: Tolerations for the plugin Pod
101+
items:
102+
description: |-
103+
The pod this Toleration is attached to tolerates any taint that matches
104+
the triple <key,value,effect> using the matching operator <operator>.
105+
properties:
106+
effect:
107+
description: |-
108+
Effect indicates the taint effect to match. Empty means match all taint effects.
109+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
110+
type: string
111+
key:
112+
description: |-
113+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
114+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
115+
type: string
116+
operator:
117+
description: |-
118+
Operator represents a key's relationship to the value.
119+
Valid operators are Exists and Equal. Defaults to Equal.
120+
Exists is equivalent to wildcard for value, so that a pod can
121+
tolerate all taints of a particular category.
122+
type: string
123+
tolerationSeconds:
124+
description: |-
125+
TolerationSeconds represents the period of time the toleration (which must be
126+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
127+
it is not set, which means tolerate the taint forever (do not evict). Zero and
128+
negative values will be treated as 0 (evict immediately) by the system.
129+
format: int64
130+
type: integer
131+
value:
132+
description: |-
133+
Value is the taint value the toleration matches to.
134+
If the operator is Exists, the value should be empty, otherwise just a regular string.
135+
type: string
136+
type: object
137+
type: array
99138
type: object
100139
status:
101140
description: |-

deployments/operator/crd/bases/deviceplugin.intel.com_iaadeviceplugins.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,45 @@ spec:
8181
the same IAA device.
8282
minimum: 1
8383
type: integer
84+
tolerations:
85+
description: Tolerations for the plugin Pod
86+
items:
87+
description: |-
88+
The pod this Toleration is attached to tolerates any taint that matches
89+
the triple <key,value,effect> using the matching operator <operator>.
90+
properties:
91+
effect:
92+
description: |-
93+
Effect indicates the taint effect to match. Empty means match all taint effects.
94+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
95+
type: string
96+
key:
97+
description: |-
98+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
99+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
100+
type: string
101+
operator:
102+
description: |-
103+
Operator represents a key's relationship to the value.
104+
Valid operators are Exists and Equal. Defaults to Equal.
105+
Exists is equivalent to wildcard for value, so that a pod can
106+
tolerate all taints of a particular category.
107+
type: string
108+
tolerationSeconds:
109+
description: |-
110+
TolerationSeconds represents the period of time the toleration (which must be
111+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
112+
it is not set, which means tolerate the taint forever (do not evict). Zero and
113+
negative values will be treated as 0 (evict immediately) by the system.
114+
format: int64
115+
type: integer
116+
value:
117+
description: |-
118+
Value is the taint value the toleration matches to.
119+
If the operator is Exists, the value should be empty, otherwise just a regular string.
120+
type: string
121+
type: object
122+
type: array
84123
type: object
85124
status:
86125
description: IaaDevicePluginStatus defines the observed state of IaaDevicePlugin.

deployments/operator/crd/bases/deviceplugin.intel.com_qatdeviceplugins.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,45 @@ spec:
111111
description: ProvisioningConfig is a ConfigMap used to pass the configuration
112112
of QAT devices into qat initcontainer.
113113
type: string
114+
tolerations:
115+
description: Tolerations for the plugin Pod
116+
items:
117+
description: |-
118+
The pod this Toleration is attached to tolerates any taint that matches
119+
the triple <key,value,effect> using the matching operator <operator>.
120+
properties:
121+
effect:
122+
description: |-
123+
Effect indicates the taint effect to match. Empty means match all taint effects.
124+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
125+
type: string
126+
key:
127+
description: |-
128+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
129+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
130+
type: string
131+
operator:
132+
description: |-
133+
Operator represents a key's relationship to the value.
134+
Valid operators are Exists and Equal. Defaults to Equal.
135+
Exists is equivalent to wildcard for value, so that a pod can
136+
tolerate all taints of a particular category.
137+
type: string
138+
tolerationSeconds:
139+
description: |-
140+
TolerationSeconds represents the period of time the toleration (which must be
141+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
142+
it is not set, which means tolerate the taint forever (do not evict). Zero and
143+
negative values will be treated as 0 (evict immediately) by the system.
144+
format: int64
145+
type: integer
146+
value:
147+
description: |-
148+
Value is the taint value the toleration matches to.
149+
If the operator is Exists, the value should be empty, otherwise just a regular string.
150+
type: string
151+
type: object
152+
type: array
114153
type: object
115154
status:
116155
description: |-

deployments/operator/crd/bases/deviceplugin.intel.com_sgxdeviceplugins.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,45 @@ spec:
8383
the same SGX provision device.
8484
minimum: 1
8585
type: integer
86+
tolerations:
87+
description: Tolerations for the plugin Pod
88+
items:
89+
description: |-
90+
The pod this Toleration is attached to tolerates any taint that matches
91+
the triple <key,value,effect> using the matching operator <operator>.
92+
properties:
93+
effect:
94+
description: |-
95+
Effect indicates the taint effect to match. Empty means match all taint effects.
96+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
97+
type: string
98+
key:
99+
description: |-
100+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
101+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
102+
type: string
103+
operator:
104+
description: |-
105+
Operator represents a key's relationship to the value.
106+
Valid operators are Exists and Equal. Defaults to Equal.
107+
Exists is equivalent to wildcard for value, so that a pod can
108+
tolerate all taints of a particular category.
109+
type: string
110+
tolerationSeconds:
111+
description: |-
112+
TolerationSeconds represents the period of time the toleration (which must be
113+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
114+
it is not set, which means tolerate the taint forever (do not evict). Zero and
115+
negative values will be treated as 0 (evict immediately) by the system.
116+
format: int64
117+
type: integer
118+
value:
119+
description: |-
120+
Value is the taint value the toleration matches to.
121+
If the operator is Exists, the value should be empty, otherwise just a regular string.
122+
type: string
123+
type: object
124+
type: array
86125
type: object
87126
status:
88127
description: SgxDevicePluginStatus defines the observed state of SgxDevicePlugin.

pkg/apis/deviceplugin/v1/dlbdeviceplugin_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ type DlbDevicePluginSpec struct {
3434
// InitImage is a container image with a script that initializes devices.
3535
InitImage string `json:"initImage,omitempty"`
3636

37+
// Tolerations for the plugin Pod
38+
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
39+
3740
// LogLevel sets the plugin's log level.
3841
// +kubebuilder:validation:Minimum=0
3942
LogLevel int `json:"logLevel,omitempty"`

pkg/apis/deviceplugin/v1/dsadeviceplugin_types.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ type DsaDevicePluginSpec struct {
3737
// ProvisioningConfig is a ConfigMap used to pass the DSA devices and workqueues configuration into idxd-config initcontainer.
3838
ProvisioningConfig string `json:"provisioningConfig,omitempty"`
3939

40+
// Tolerations for the plugin Pod
41+
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
42+
4043
// SharedDevNum is a number of containers that can share the same DSA device.
4144
// +kubebuilder:validation:Minimum=1
4245
SharedDevNum int `json:"sharedDevNum,omitempty"`
@@ -84,8 +87,8 @@ type DsaDevicePlugin struct {
8487
metav1.TypeMeta `json:",inline"`
8588
metav1.ObjectMeta `json:"metadata,omitempty"`
8689

87-
Spec DsaDevicePluginSpec `json:"spec,omitempty"`
8890
Status DsaDevicePluginStatus `json:"status,omitempty"`
91+
Spec DsaDevicePluginSpec `json:"spec,omitempty"`
8992
}
9093

9194
// +kubebuilder:object:root=true

pkg/apis/deviceplugin/v1/fpgadeviceplugin_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ type FpgaDevicePluginSpec struct {
3838
// +kubebuilder:validation:Enum=af;region;regiondevel
3939
Mode string `json:"mode,omitempty"`
4040

41+
// Tolerations for the plugin Pod
42+
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
43+
4144
// LogLevel sets the plugin's log level.
4245
// +kubebuilder:validation:Minimum=0
4346
LogLevel int `json:"logLevel,omitempty"`

0 commit comments

Comments
 (0)