diff --git a/charts/py-app/templates/deployment.yaml b/charts/py-app/templates/deployment.yaml index 01a33b2..4533e17 100644 --- a/charts/py-app/templates/deployment.yaml +++ b/charts/py-app/templates/deployment.yaml @@ -8,6 +8,7 @@ metadata: spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit | default 5 }} {{- end }} {{- with .Values.updateStrategy }} strategy: @@ -53,6 +54,9 @@ spec: startupProbe: {{ . | toYaml | nindent 12 }} {{- end }} {{- include "py-app.envs" . | indent 10 -}} + {{- with .Values.securityContext }} + securityContext: {{ . | toYaml | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/charts/py-app/templates/taskiq-scheduler.yaml b/charts/py-app/templates/taskiq-scheduler.yaml index fa6ac05..d92cf73 100644 --- a/charts/py-app/templates/taskiq-scheduler.yaml +++ b/charts/py-app/templates/taskiq-scheduler.yaml @@ -33,5 +33,5 @@ spec: command: {{ .Values.taskiq.schedulerCmd | toYaml | nindent 10 }} {{- include "py-app.envs" . | indent 10 -}} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.taskiq.resources | nindent 12 }} {{- end }} diff --git a/charts/py-app/templates/taskiq-worker.yaml b/charts/py-app/templates/taskiq-worker.yaml index 31712e5..a9ec44b 100644 --- a/charts/py-app/templates/taskiq-worker.yaml +++ b/charts/py-app/templates/taskiq-worker.yaml @@ -39,5 +39,5 @@ spec: command: {{ .Values.taskiq.workerCmd | toYaml | nindent 10 }} {{- include "py-app.envs" . | indent 10 -}} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.taskiq.resources | nindent 12 }} {{- end }} diff --git a/charts/py-app/values.yaml b/charts/py-app/values.yaml index 25083fb..0e2db73 100644 --- a/charts/py-app/values.yaml +++ b/charts/py-app/values.yaml @@ -30,6 +30,7 @@ ttlSecondsAfterFinished: 3600 taskiq: workerCmd: [] schedulerCmd: [] + resources: {} workers: 1 autoscaling: enabled: false