Merge pull request #8 from Intreecom/feature/extra-manifests

feature: capability to add extra kubernetes manifests
This commit is contained in:
Dev Jadeja
2025-02-13 11:28:33 +05:30
committed by GitHub
6 changed files with 39 additions and 2 deletions

View File

@ -8,6 +8,7 @@ metadata:
spec: spec:
{{- if not .Values.autoscaling.enabled }} {{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit | default 5 }}
{{- end }} {{- end }}
{{- with .Values.updateStrategy }} {{- with .Values.updateStrategy }}
strategy: strategy:
@ -49,7 +50,13 @@ spec:
{{- with .Values.probes.readiness }} {{- with .Values.probes.readiness }}
readinessProbe: {{ . | toYaml | nindent 12 }} readinessProbe: {{ . | toYaml | nindent 12 }}
{{- end }} {{- end }}
{{- with .Values.probes.startup }}
startupProbe: {{ . | toYaml | nindent 12 }}
{{- end }}
{{- include "py-app.envs" . | indent 10 -}} {{- include "py-app.envs" . | indent 10 -}}
{{- with .Values.securityContext }}
securityContext: {{ . | toYaml | nindent 12 }}
{{- end }}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}

View File

@ -0,0 +1,6 @@
{{- if .Values.extraManifests }}
{{- range .Values.extraManifests }}
---
{{ toYaml . }}
{{- end }}
{{- end }}

View File

@ -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 -}}

View File

@ -33,5 +33,5 @@ spec:
command: {{ .Values.taskiq.schedulerCmd | toYaml | nindent 10 }} command: {{ .Values.taskiq.schedulerCmd | toYaml | nindent 10 }}
{{- include "py-app.envs" . | indent 10 -}} {{- include "py-app.envs" . | indent 10 -}}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.taskiq.resources | nindent 12 }}
{{- end }} {{- end }}

View File

@ -39,5 +39,5 @@ spec:
command: {{ .Values.taskiq.workerCmd | toYaml | nindent 10 }} command: {{ .Values.taskiq.workerCmd | toYaml | nindent 10 }}
{{- include "py-app.envs" . | indent 10 -}} {{- include "py-app.envs" . | indent 10 -}}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.taskiq.resources | nindent 12 }}
{{- end }} {{- end }}

View File

@ -30,6 +30,7 @@ ttlSecondsAfterFinished: 3600
taskiq: taskiq:
workerCmd: [] workerCmd: []
schedulerCmd: [] schedulerCmd: []
resources: {}
workers: 1 workers: 1
autoscaling: autoscaling:
enabled: false enabled: false
@ -125,3 +126,14 @@ autoscaling:
maxReplicas: 20 maxReplicas: 20
targetCPUUtilizationPercentage: 80 targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80
limitRange:
create: false
# limits:
# - default:
# memory: 700Mi
# defaultRequest:
# cpu: 50m
# memory: 500Mi
# type: Container
extraManifests: []