feat(helm): add per-component affinity and tolerations (#5490)

Allow scheduling backend, frontend, and postgres pods onto tainted or
labeled nodes independently via values.yaml.
This commit is contained in:
Christian Rodriguez
2026-07-16 00:59:21 -03:00
committed by GitHub
parent d74aed1e07
commit 7b89c5104c
4 changed files with 33 additions and 0 deletions

View File

@@ -104,6 +104,14 @@ spec:
periodSeconds: 30
resources:
{{- toYaml .Values.backend.resources | nindent 12 }}
{{- with .Values.backend.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.backend.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.backend.uploads.persistence.enabled }}
volumes:
- name: uploads

View File

@@ -33,6 +33,14 @@ spec:
value: "3000"
resources:
{{- toYaml .Values.frontend.resources | nindent 12 }}
{{- with .Values.frontend.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
apiVersion: v1
kind: Service

View File

@@ -77,6 +77,14 @@ spec:
periodSeconds: 5
resources:
{{- toYaml .Values.postgres.resources | nindent 12 }}
{{- with .Values.postgres.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.postgres.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: data
persistentVolumeClaim:

View File

@@ -68,6 +68,9 @@ postgres:
limits:
cpu: 1000m
memory: 1Gi
# Standard Kubernetes scheduling constraints for the postgres Deployment.
affinity: {}
tolerations: []
# -----------------------------------------------------------------------------
# Backend (Go API + WS server)
@@ -135,6 +138,9 @@ backend:
limits:
cpu: 1000m
memory: 1Gi
# Standard Kubernetes scheduling constraints for the backend Deployment.
affinity: {}
tolerations: []
# -----------------------------------------------------------------------------
# Frontend (Next.js standalone)
@@ -162,6 +168,9 @@ frontend:
limits:
cpu: 1000m
memory: 1Gi
# Standard Kubernetes scheduling constraints for the frontend Deployment.
affinity: {}
tolerations: []
# -----------------------------------------------------------------------------
# Ingress