Skip to content

Commit f6f83ed

Browse files
the-mentorclaude
andcommitted
Add configurable nodeSelector to substrate workloads
Add a global `nodeSelector` value plus per-component overrides (ateApiServer, ateController, atenetRouter, dns, rustfs, atelet) so the substrate workloads can be pinned to specific nodes. Each component resolves its effective nodeSelector as `or .Values.<component>.nodeSelector .Values.nodeSelector`, so a non-empty component-level map wins and otherwise the global default applies. All defaults are empty, so rendered output is unchanged (render-manifests --check passes). valkey is intentionally excluded. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0e3b4ed commit f6f83ed

7 files changed

Lines changed: 49 additions & 0 deletions

File tree

charts/substrate/templates/ate-api-server.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ spec:
6969
prometheus.io/port: "9090"
7070
spec:
7171
serviceAccountName: {{ include "substrate.fullname" (list "ate-api-server" .) }}
72+
{{- with (or .Values.ateApiServer.nodeSelector .Values.nodeSelector) }}
73+
nodeSelector:
74+
{{- toYaml . | nindent 8 }}
75+
{{- end }}
7276
{{- if eq .Values.auth.mode "jwt" }}
7377
initContainers:
7478
- name: assemble-cred-bundle

charts/substrate/templates/ate-controller.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ spec:
6767
app: ate-controller
6868
spec:
6969
serviceAccountName: {{ include "substrate.fullname" (list "ate-controller" .) }}
70+
{{- with (or .Values.ateController.nodeSelector .Values.nodeSelector) }}
71+
nodeSelector:
72+
{{- toYaml . | nindent 8 }}
73+
{{- end }}
7074
containers:
7175
- name: ate-controller
7276
image: {{ include "substrate.componentImage" (list "atecontroller" .) }}

charts/substrate/templates/atelet.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ spec:
6363
prometheus.io/port: "9090"
6464
spec:
6565
serviceAccountName: {{ include "substrate.fullname" (list "atelet" .) }}
66+
{{- with (or .Values.atelet.nodeSelector .Values.nodeSelector) }}
67+
nodeSelector:
68+
{{- toYaml . | nindent 8 }}
69+
{{- end }}
6670
containers:
6771
- name: atelet
6872
image: {{ include "substrate.componentImage" (list "atelet" .) }}

charts/substrate/templates/atenet-dns.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ spec:
9292
app: dns
9393
spec:
9494
serviceAccountName: {{ include "substrate.fullname" (list "atenet-dns" .) }}
95+
{{- with (or .Values.dns.nodeSelector .Values.nodeSelector) }}
96+
nodeSelector:
97+
{{- toYaml . | nindent 8 }}
98+
{{- end }}
9599
shareProcessNamespace: true
96100
initContainers:
97101
- name: init-dns

charts/substrate/templates/atenet-router.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ spec:
136136
prometheus.io/port: "9090"
137137
spec:
138138
serviceAccountName: {{ include "substrate.fullname" (list "atenet-router" .) }}
139+
{{- with (or .Values.atenetRouter.nodeSelector .Values.nodeSelector) }}
140+
nodeSelector:
141+
{{- toYaml . | nindent 8 }}
142+
{{- end }}
139143
containers:
140144
- name: atenet-router
141145
image: {{ include "substrate.componentImage" (list "atenet" .) }}

charts/substrate/templates/rustfs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ spec:
5959
labels:
6060
app: rustfs
6161
spec:
62+
{{- with (or .Values.rustfs.nodeSelector .Values.nodeSelector) }}
63+
nodeSelector:
64+
{{- toYaml . | nindent 8 }}
65+
{{- end }}
6266
securityContext:
6367
runAsUser: 10001
6468
runAsGroup: 10001

charts/substrate/values.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ auth:
7171
# manifests/ate-install/ install path (kubectl apply).
7272
createNamespace: false
7373

74+
# Global nodeSelector applied to the substrate workloads (ate-api-server,
75+
# ate-controller, atenet-router, dns, rustfs, and the atelet DaemonSet). Each
76+
# of those components also exposes its own `nodeSelector`; when set to a
77+
# non-empty map it overrides this global default for that component.
78+
nodeSelector: {}
79+
7480
valkey:
7581
enabled: true
7682
replicas: 6
@@ -82,6 +88,8 @@ rustfs:
8288
bucket: ate-snapshots
8389
accessKey: rustfsadmin
8490
secretKey: rustfsadmin
91+
# Overrides the global .Values.nodeSelector for the rustfs deployment.
92+
nodeSelector: {}
8593

8694
# atelet daemonset overrides. Defaults use the in-cluster RustFS deployment for
8795
# snapshots. Set rustfs.enabled=false and override these fields when using
@@ -93,6 +101,23 @@ atelet:
93101
storageBackend: s3
94102
extraArgs: []
95103
extraEnv: []
104+
# Overrides the global .Values.nodeSelector for the atelet DaemonSet.
105+
nodeSelector: {}
106+
107+
# Per-component overrides for the control-plane deployments. Each nodeSelector,
108+
# when set to a non-empty map, overrides the global .Values.nodeSelector for
109+
# that component only.
110+
ateApiServer:
111+
nodeSelector: {}
112+
113+
ateController:
114+
nodeSelector: {}
115+
116+
atenetRouter:
117+
nodeSelector: {}
118+
119+
dns:
120+
nodeSelector: {}
96121

97122
redis:
98123
# Override the cluster address. Empty -> derived from valkey.enabled

0 commit comments

Comments
 (0)