Skip to content

Commit 1d4587f

Browse files
authored
kcp: add nodeSelector (#211)
Signed-off-by: ghdrope <0coasts-gearing@icloud.com>
1 parent e8c74ef commit 1d4587f

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

charts/kcp/templates/etcd-statefulset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ spec:
4949
{{- include "common.labels" . | nindent 8 }}
5050
app.kubernetes.io/component: "etcd"
5151
spec:
52+
{{- with .Values.etcd.nodeSelector}}
53+
nodeSelector:
54+
{{- toYaml . | nindent 8 }}
55+
{{- end }}
5256
{{- with .Values.etcd.affinity}}
5357
affinity:
5458
{{- toYaml . | nindent 8 }}

charts/kcp/templates/front-proxy-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ spec:
6464
hostAliases:
6565
{{- toYaml .Values.kcpFrontProxy.hostAliases.values | nindent 8 }}
6666
{{- end }}
67+
{{- with .Values.kcpFrontProxy.nodeSelector}}
68+
nodeSelector:
69+
{{- toYaml . | nindent 8 }}
70+
{{- end }}
6771
{{- with .Values.kcpFrontProxy.affinity}}
6872
affinity:
6973
{{- toYaml . | nindent 8 }}

charts/kcp/templates/server-deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ spec:
9898
hostAliases:
9999
{{- toYaml .Values.kcp.hostAliases.values | nindent 8 }}
100100
{{- end }}
101+
{{- with .Values.kcp.nodeSelector}}
102+
nodeSelector:
103+
{{- toYaml . | nindent 8 }}
104+
{{- end }}
101105
{{- with .Values.kcp.affinity}}
102106
affinity:
103107
{{- toYaml . | nindent 8 }}

charts/kcp/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ etcd:
4141
enabled: false
4242
maxUnavailable: 1
4343

44+
# This configures the node selector for scheduling kcp etcd pods to specific nodes.
45+
# For more information see https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector.
46+
nodeSelector: {}
47+
4448
# When configured, this will add tolerations to the pods.
4549
tolerations: []
4650
# - key: "kcp"
@@ -151,6 +155,10 @@ kcp:
151155
enabled: false
152156
minAvailable: 1
153157

158+
# This configures the node selector for scheduling kcp server pods to specific nodes.
159+
# For more information see https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector.
160+
nodeSelector: {}
161+
154162
# When configured, this will add tolerations to the pods.
155163
tolerations: []
156164
# - key: "kcp"
@@ -311,6 +319,10 @@ kcpFrontProxy:
311319
# - name: example-vw-serving-cert
312320
# mountPath: /etc/example-vw-serving-cert
313321

322+
# This configures the node selector for scheduling kcp-front-proxy pods to specific nodes.
323+
# For more information see https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector.
324+
nodeSelector: {}
325+
314326
# When configured, this will add tolerations to the pods.
315327
tolerations: []
316328
# - key: "kcp"

0 commit comments

Comments
 (0)