diff --git a/charts/py-app/templates/deployment.yaml b/charts/py-app/templates/deployment.yaml index 6b13ecb..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: @@ -49,7 +50,13 @@ spec: {{- with .Values.probes.readiness }} readinessProbe: {{ . | toYaml | nindent 12 }} {{- end }} + {{- with .Values.probes.startup }} + 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/extra-objects.yaml b/charts/py-app/templates/extra-objects.yaml new file mode 100644 index 0000000..ee0aeb3 --- /dev/null +++ b/charts/py-app/templates/extra-objects.yaml @@ -0,0 +1,6 @@ +{{- if .Values.extraManifests }} +{{- range .Values.extraManifests }} +--- +{{ toYaml . }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/py-app/templates/limitrange.yaml b/charts/py-app/templates/limitrange.yaml new file mode 100644 index 0000000..b528383 --- /dev/null +++ b/charts/py-app/templates/limitrange.yaml @@ -0,0 +1,12 @@ +{{- if .Values.limitRange.create }} +apiVersion: v1 +kind: LimitRange +metadata: + name: {{ include "py-app.fullname" . }} + labels: + {{- include "py-app.labels" . | nindent 4 }} +spec: + {{- with .Values.limitRange.limits }} + limits: {{ . | toYaml | nindent 2 }} + {{- end }} +{{- end -}} 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 2a11b42..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 @@ -125,3 +126,14 @@ autoscaling: maxReplicas: 20 targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 + +limitRange: + create: false + # limits: + # - default: + # memory: 700Mi + # defaultRequest: + # cpu: 50m + # memory: 500Mi + # type: Container +extraManifests: [] \ No newline at end of file