diff --git a/helm-charts/chatqna/templates/deployment.yaml b/helm-charts/chatqna/templates/deployment.yaml index a3c78ca8..caac42a1 100644 --- a/helm-charts/chatqna/templates/deployment.yaml +++ b/helm-charts/chatqna/templates/deployment.yaml @@ -84,3 +84,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "chatqna.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/codegen/templates/deployment.yaml b/helm-charts/codegen/templates/deployment.yaml index 65a084c5..62c35e66 100644 --- a/helm-charts/codegen/templates/deployment.yaml +++ b/helm-charts/codegen/templates/deployment.yaml @@ -78,3 +78,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "codegen.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/codetrans/templates/deployment.yaml b/helm-charts/codetrans/templates/deployment.yaml index 1eae19ea..14fc8253 100644 --- a/helm-charts/codetrans/templates/deployment.yaml +++ b/helm-charts/codetrans/templates/deployment.yaml @@ -66,3 +66,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "codetrans.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/asr/templates/deployment.yaml b/helm-charts/common/asr/templates/deployment.yaml index 529c342c..949ea3c0 100644 --- a/helm-charts/common/asr/templates/deployment.yaml +++ b/helm-charts/common/asr/templates/deployment.yaml @@ -77,3 +77,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "asr.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/chatqna-ui/templates/deployment.yaml b/helm-charts/common/chatqna-ui/templates/deployment.yaml index f201a58b..3cc55641 100644 --- a/helm-charts/common/chatqna-ui/templates/deployment.yaml +++ b/helm-charts/common/chatqna-ui/templates/deployment.yaml @@ -65,3 +65,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "chatqna-ui.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/data-prep/templates/deployment.yaml b/helm-charts/common/data-prep/templates/deployment.yaml index 607330a4..39099732 100644 --- a/helm-charts/common/data-prep/templates/deployment.yaml +++ b/helm-charts/common/data-prep/templates/deployment.yaml @@ -77,3 +77,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "data-prep.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/embedding-usvc/templates/deployment.yaml b/helm-charts/common/embedding-usvc/templates/deployment.yaml index 26f5a76f..2fff1e6d 100644 --- a/helm-charts/common/embedding-usvc/templates/deployment.yaml +++ b/helm-charts/common/embedding-usvc/templates/deployment.yaml @@ -77,3 +77,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "embedding-usvc.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/guardrails-usvc/templates/deployment.yaml b/helm-charts/common/guardrails-usvc/templates/deployment.yaml index 209dcf9c..bb6d396e 100644 --- a/helm-charts/common/guardrails-usvc/templates/deployment.yaml +++ b/helm-charts/common/guardrails-usvc/templates/deployment.yaml @@ -77,3 +77,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "guardrails-usvc.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/llm-uservice/templates/deployment.yaml b/helm-charts/common/llm-uservice/templates/deployment.yaml index c1dea43e..716886a1 100644 --- a/helm-charts/common/llm-uservice/templates/deployment.yaml +++ b/helm-charts/common/llm-uservice/templates/deployment.yaml @@ -77,3 +77,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "llm-uservice.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/redis-vector-db/templates/deployment.yaml b/helm-charts/common/redis-vector-db/templates/deployment.yaml index 575755c8..1dd12f10 100644 --- a/helm-charts/common/redis-vector-db/templates/deployment.yaml +++ b/helm-charts/common/redis-vector-db/templates/deployment.yaml @@ -74,3 +74,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "redis-vector-db.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/reranking-usvc/templates/deployment.yaml b/helm-charts/common/reranking-usvc/templates/deployment.yaml index 9fc05bc0..31902655 100644 --- a/helm-charts/common/reranking-usvc/templates/deployment.yaml +++ b/helm-charts/common/reranking-usvc/templates/deployment.yaml @@ -77,3 +77,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "reranking-usvc.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/retriever-usvc/templates/deployment.yaml b/helm-charts/common/retriever-usvc/templates/deployment.yaml index ef31dbf0..e4f2483b 100644 --- a/helm-charts/common/retriever-usvc/templates/deployment.yaml +++ b/helm-charts/common/retriever-usvc/templates/deployment.yaml @@ -77,3 +77,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "retriever-usvc.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/speecht5/templates/deployment.yaml b/helm-charts/common/speecht5/templates/deployment.yaml index dd718728..061c34fd 100644 --- a/helm-charts/common/speecht5/templates/deployment.yaml +++ b/helm-charts/common/speecht5/templates/deployment.yaml @@ -94,3 +94,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "speecht5.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/tei/templates/deployment.yaml b/helm-charts/common/tei/templates/deployment.yaml index fe56355f..798f979f 100644 --- a/helm-charts/common/tei/templates/deployment.yaml +++ b/helm-charts/common/tei/templates/deployment.yaml @@ -109,3 +109,12 @@ spec: # extra time to finish processing buffered requests before HPA forcibly terminates pod terminationGracePeriodSeconds: 60 {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "tei.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/teirerank/templates/deployment.yaml b/helm-charts/common/teirerank/templates/deployment.yaml index 45d2cc95..28f2099d 100644 --- a/helm-charts/common/teirerank/templates/deployment.yaml +++ b/helm-charts/common/teirerank/templates/deployment.yaml @@ -109,3 +109,12 @@ spec: # extra time to finish processing buffered requests before HPA forcibly terminates pod terminationGracePeriodSeconds: 60 {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "teirerank.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/tgi/templates/deployment.yaml b/helm-charts/common/tgi/templates/deployment.yaml index a40fd749..bafd0ac3 100644 --- a/helm-charts/common/tgi/templates/deployment.yaml +++ b/helm-charts/common/tgi/templates/deployment.yaml @@ -113,3 +113,12 @@ spec: # extra time to finish processing buffered requests before HPA forcibly terminates pod terminationGracePeriodSeconds: 120 {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "tgi.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/tts/templates/deployment.yaml b/helm-charts/common/tts/templates/deployment.yaml index ca7f9b36..43f79a5f 100644 --- a/helm-charts/common/tts/templates/deployment.yaml +++ b/helm-charts/common/tts/templates/deployment.yaml @@ -77,3 +77,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "tts.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/vllm/templates/deployment.yaml b/helm-charts/common/vllm/templates/deployment.yaml index 133cc0df..14c65f76 100644 --- a/helm-charts/common/vllm/templates/deployment.yaml +++ b/helm-charts/common/vllm/templates/deployment.yaml @@ -114,3 +114,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "vllm.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/web-retriever/templates/deployment.yaml b/helm-charts/common/web-retriever/templates/deployment.yaml index cfb3e696..cbec7a5a 100644 --- a/helm-charts/common/web-retriever/templates/deployment.yaml +++ b/helm-charts/common/web-retriever/templates/deployment.yaml @@ -77,3 +77,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "web-retriever.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/common/whisper/templates/deployment.yaml b/helm-charts/common/whisper/templates/deployment.yaml index 1e1860ac..8a9b4a3c 100644 --- a/helm-charts/common/whisper/templates/deployment.yaml +++ b/helm-charts/common/whisper/templates/deployment.yaml @@ -94,3 +94,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "whisper.selectorLabels" . | nindent 14 }} + {{- end }} diff --git a/helm-charts/docsum/templates/deployment.yaml b/helm-charts/docsum/templates/deployment.yaml index 950b67a8..a14cd7d9 100644 --- a/helm-charts/docsum/templates/deployment.yaml +++ b/helm-charts/docsum/templates/deployment.yaml @@ -66,3 +66,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.evenly_distributed }} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + {{- include "docsum.selectorLabels" . | nindent 14 }} + {{- end }}