diff --git a/chart/templates/dashboard/deployment.yaml b/chart/templates/dashboard/deployment.yaml index c25baa9..aea08a4 100644 --- a/chart/templates/dashboard/deployment.yaml +++ b/chart/templates/dashboard/deployment.yaml @@ -89,4 +89,8 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.dashboard.frontend.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/chart/templates/frontproxy/deployment.yaml b/chart/templates/frontproxy/deployment.yaml index c57bde9..2b69a18 100644 --- a/chart/templates/frontproxy/deployment.yaml +++ b/chart/templates/frontproxy/deployment.yaml @@ -57,6 +57,7 @@ spec: - name: config configMap: name: {{ .Chart.Name }}-frontproxy + {{- if eq .Values.frontproxy.topologySpreadConstraints nil }} topologySpreadConstraints: - maxSkew: 1 topologyKey: kubernetes.io/hostname @@ -65,4 +66,20 @@ spec: matchLabels: {{- include "s3proxy.selectorLabels" . | nindent 14 }} app.kubernetes.io/component: frontproxy + {{- else if .Values.frontproxy.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml .Values.frontproxy.topologySpreadConstraints | nindent 8 }} + {{- end }} + {{- with .Values.frontproxy.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.frontproxy.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.frontproxy.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/chart/templates/redis/deployment.yaml b/chart/templates/redis/deployment.yaml index 4fd7efe..39e5cad 100644 --- a/chart/templates/redis/deployment.yaml +++ b/chart/templates/redis/deployment.yaml @@ -83,4 +83,20 @@ spec: {{- else }} emptyDir: {} {{- end }} + {{- with .Values.redis.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.redis.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.redis.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.redis.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 659ff2d..3566372 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -59,6 +59,10 @@ redis: limits: cpu: "500m" memory: "256Mi" + nodeSelector: {} + affinity: {} + tolerations: [] + topologySpreadConstraints: [] # External Redis — used when `redis.enabled: false`. Point at a Redis you run # yourself (managed service, shared cluster, your own HA setup). @@ -124,6 +128,7 @@ dashboard: nodeSelector: {} affinity: {} tolerations: [] + topologySpreadConstraints: [] # Optional dedicated Ingress for the dashboard. OFF by default — the dashboard # should not be internet-facing unless you explicitly expose it (ideally behind @@ -184,6 +189,11 @@ frontproxy: podDisruptionBudget: enabled: true minAvailable: 1 + nodeSelector: {} + affinity: {} + tolerations: [] + # null (default): spread pods across nodes. Set to [] to disable, or provide custom rules. + topologySpreadConstraints: # Optional Ingress to expose S3 operations OUTSIDE the cluster. Routes to the # front proxy, so external clients also get even per-request distribution —