From 711253beb223531dc81d2b085bbc4c4de093dfb3 Mon Sep 17 00:00:00 2001 From: ariretiarno Date: Sun, 5 Oct 2025 22:36:39 +0700 Subject: [PATCH] affinity request limit --- .../helm/checkmate/templates/client-deployment.yaml | 12 ++++++++++++ .../checkmate/templates/mongodb-statefulsets.yaml | 12 ++++++++++++ .../helm/checkmate/templates/server-deployment.yaml | 12 ++++++++++++ 3 files changed, 36 insertions(+) diff --git a/charts/helm/checkmate/templates/client-deployment.yaml b/charts/helm/checkmate/templates/client-deployment.yaml index a5d487dc8..07175b674 100644 --- a/charts/helm/checkmate/templates/client-deployment.yaml +++ b/charts/helm/checkmate/templates/client-deployment.yaml @@ -12,6 +12,14 @@ spec: labels: app: checkmate-client spec: + {{- with .Values.client.affinity }} + affinity: + {{- tpl ( . | toYaml) $ | nindent 8 }} + {{- end }} + {{- with .Values.client.tolerations }} + tolerations: + {{- tpl ( . | toYaml) $ | nindent 8 }} + {{- end }} containers: - name: client image: {{ .Values.client.image }} @@ -26,6 +34,10 @@ spec: - name: config-volume mountPath: /etc/nginx/conf.d/default.conf subPath: default.conf + {{- with .Values.client.resources }} + resources: + {{- tpl ( . | toYaml) $ | nindent 12 }} + {{- end }} volumes: - name: config-volume configMap: diff --git a/charts/helm/checkmate/templates/mongodb-statefulsets.yaml b/charts/helm/checkmate/templates/mongodb-statefulsets.yaml index 1ffd1c228..f849e4e21 100644 --- a/charts/helm/checkmate/templates/mongodb-statefulsets.yaml +++ b/charts/helm/checkmate/templates/mongodb-statefulsets.yaml @@ -12,6 +12,14 @@ spec: labels: app: checkmate-mongodb spec: + {{- with .Values.mongodb.affinity }} + affinity: + {{- tpl ( . | toYaml) $ | nindent 8 }} + {{- end }} + {{- with .Values.mongodb.tolerations }} + tolerations: + {{- tpl ( . | toYaml) $ | nindent 8 }} + {{- end }} containers: - name: mongodb image: {{ .Values.mongodb.image }} @@ -21,6 +29,10 @@ spec: volumeMounts: - name: checkmate-mongo-persistent-storage mountPath: /data/db + {{- with .Values.mongodb.resources }} + resources: + {{- tpl ( . | toYaml) $ | nindent 12 }} + {{- end }} volumeClaimTemplates: - metadata: name: checkmate-mongo-persistent-storage diff --git a/charts/helm/checkmate/templates/server-deployment.yaml b/charts/helm/checkmate/templates/server-deployment.yaml index 8c9403916..2ba045b1f 100644 --- a/charts/helm/checkmate/templates/server-deployment.yaml +++ b/charts/helm/checkmate/templates/server-deployment.yaml @@ -12,6 +12,14 @@ spec: labels: app: checkmate-server spec: + {{- with .Values.server.affinity }} + affinity: + {{- tpl ( . | toYaml) $ | nindent 8 }} + {{- end }} + {{- with .Values.server.tolerations }} + tolerations: + {{- tpl ( . | toYaml) $ | nindent 8 }} + {{- end }} containers: - name: server image: {{ .Values.server.image }} @@ -20,6 +28,10 @@ spec: envFrom: - secretRef: name: checkmate-secrets + {{- with .Values.server.resources }} + resources: + {{- tpl ( . | toYaml) $ | nindent 12 }} + {{- end }} env: - name: CLIENT_HOST value: "http://{{ .Values.client.ingress.host }}"