Skip to content

Commit ed92a62

Browse files
authored
[Feat] Add nodeSelectorTerms for vllmRunTimes (#778)
Signed-off-by: Mahmoud Ayman <mahmoudk1000@gmail.com>
1 parent 5694032 commit ed92a62

File tree

4 files changed

+298
-37
lines changed

4 files changed

+298
-37
lines changed

operator/api/v1alpha1/vllmruntime_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ type DeploymentConfig struct {
3030
// +kubebuilder:default=1
3131
Replicas int32 `json:"replicas,omitempty"`
3232

33+
// Node selector
34+
NodeSelectorTerms []corev1.NodeSelectorTerm `json:"nodeSelectorTerms,omitempty"`
35+
3336
// Deploy strategy
3437
// +kubebuilder:validation:Enum=RollingUpdate;Recreate
3538
// +kubebuilder:default=RollingUpdate

operator/api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operator/config/crd/bases/production-stack.vllm.ai_vllmruntimes.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,85 @@ spec:
6666
- name
6767
- registry
6868
type: object
69+
nodeSelectorTerms:
70+
description: Node selector
71+
items:
72+
description: |-
73+
A null or empty node selector term matches no objects. The requirements of
74+
them are ANDed.
75+
The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
76+
properties:
77+
matchExpressions:
78+
description: A list of node selector requirements by node's
79+
labels.
80+
items:
81+
description: |-
82+
A node selector requirement is a selector that contains values, a key, and an operator
83+
that relates the key and values.
84+
properties:
85+
key:
86+
description: The label key that the selector applies
87+
to.
88+
type: string
89+
operator:
90+
description: |-
91+
Represents a key's relationship to a set of values.
92+
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
93+
type: string
94+
values:
95+
description: |-
96+
An array of string values. If the operator is In or NotIn,
97+
the values array must be non-empty. If the operator is Exists or DoesNotExist,
98+
the values array must be empty. If the operator is Gt or Lt, the values
99+
array must have a single element, which will be interpreted as an integer.
100+
This array is replaced during a strategic merge patch.
101+
items:
102+
type: string
103+
type: array
104+
x-kubernetes-list-type: atomic
105+
required:
106+
- key
107+
- operator
108+
type: object
109+
type: array
110+
x-kubernetes-list-type: atomic
111+
matchFields:
112+
description: A list of node selector requirements by node's
113+
fields.
114+
items:
115+
description: |-
116+
A node selector requirement is a selector that contains values, a key, and an operator
117+
that relates the key and values.
118+
properties:
119+
key:
120+
description: The label key that the selector applies
121+
to.
122+
type: string
123+
operator:
124+
description: |-
125+
Represents a key's relationship to a set of values.
126+
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
127+
type: string
128+
values:
129+
description: |-
130+
An array of string values. If the operator is In or NotIn,
131+
the values array must be non-empty. If the operator is Exists or DoesNotExist,
132+
the values array must be empty. If the operator is Gt or Lt, the values
133+
array must have a single element, which will be interpreted as an integer.
134+
This array is replaced during a strategic merge patch.
135+
items:
136+
type: string
137+
type: array
138+
x-kubernetes-list-type: atomic
139+
required:
140+
- key
141+
- operator
142+
type: object
143+
type: array
144+
x-kubernetes-list-type: atomic
145+
type: object
146+
x-kubernetes-map-type: atomic
147+
type: array
69148
replicas:
70149
default: 1
71150
description: Replicas

0 commit comments

Comments
 (0)