Skip to content

Commit b3723e3

Browse files
feat(chart): add pod scheduling options to all deployments (#76)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 5b8a4c2 commit b3723e3

4 files changed

Lines changed: 47 additions & 0 deletions

File tree

chart/templates/dashboard/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,8 @@ spec:
8989
tolerations:
9090
{{- toYaml . | nindent 8 }}
9191
{{- end }}
92+
{{- with .Values.dashboard.frontend.topologySpreadConstraints }}
93+
topologySpreadConstraints:
94+
{{- toYaml . | nindent 8 }}
95+
{{- end }}
9296
{{- end }}

chart/templates/frontproxy/deployment.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ spec:
5757
- name: config
5858
configMap:
5959
name: {{ .Chart.Name }}-frontproxy
60+
{{- if eq .Values.frontproxy.topologySpreadConstraints nil }}
6061
topologySpreadConstraints:
6162
- maxSkew: 1
6263
topologyKey: kubernetes.io/hostname
@@ -65,4 +66,20 @@ spec:
6566
matchLabels:
6667
{{- include "s3proxy.selectorLabels" . | nindent 14 }}
6768
app.kubernetes.io/component: frontproxy
69+
{{- else if .Values.frontproxy.topologySpreadConstraints }}
70+
topologySpreadConstraints:
71+
{{- toYaml .Values.frontproxy.topologySpreadConstraints | nindent 8 }}
72+
{{- end }}
73+
{{- with .Values.frontproxy.nodeSelector }}
74+
nodeSelector:
75+
{{- toYaml . | nindent 8 }}
76+
{{- end }}
77+
{{- with .Values.frontproxy.affinity }}
78+
affinity:
79+
{{- toYaml . | nindent 8 }}
80+
{{- end }}
81+
{{- with .Values.frontproxy.tolerations }}
82+
tolerations:
83+
{{- toYaml . | nindent 8 }}
84+
{{- end }}
6885
{{- end }}

chart/templates/redis/deployment.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,20 @@ spec:
8383
{{- else }}
8484
emptyDir: {}
8585
{{- end }}
86+
{{- with .Values.redis.nodeSelector }}
87+
nodeSelector:
88+
{{- toYaml . | nindent 8 }}
89+
{{- end }}
90+
{{- with .Values.redis.affinity }}
91+
affinity:
92+
{{- toYaml . | nindent 8 }}
93+
{{- end }}
94+
{{- with .Values.redis.tolerations }}
95+
tolerations:
96+
{{- toYaml . | nindent 8 }}
97+
{{- end }}
98+
{{- with .Values.redis.topologySpreadConstraints }}
99+
topologySpreadConstraints:
100+
{{- toYaml . | nindent 8 }}
101+
{{- end }}
86102
{{- end }}

chart/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ redis:
5959
limits:
6060
cpu: "500m"
6161
memory: "256Mi"
62+
nodeSelector: {}
63+
affinity: {}
64+
tolerations: []
65+
topologySpreadConstraints: []
6266

6367
# External Redis — used when `redis.enabled: false`. Point at a Redis you run
6468
# yourself (managed service, shared cluster, your own HA setup).
@@ -124,6 +128,7 @@ dashboard:
124128
nodeSelector: {}
125129
affinity: {}
126130
tolerations: []
131+
topologySpreadConstraints: []
127132

128133
# Optional dedicated Ingress for the dashboard. OFF by default — the dashboard
129134
# should not be internet-facing unless you explicitly expose it (ideally behind
@@ -184,6 +189,11 @@ frontproxy:
184189
podDisruptionBudget:
185190
enabled: true
186191
minAvailable: 1
192+
nodeSelector: {}
193+
affinity: {}
194+
tolerations: []
195+
# null (default): spread pods across nodes. Set to [] to disable, or provide custom rules.
196+
topologySpreadConstraints:
187197

188198
# Optional Ingress to expose S3 operations OUTSIDE the cluster. Routes to the
189199
# front proxy, so external clients also get even per-request distribution —

0 commit comments

Comments
 (0)