Files
feedc0de 9933f9904a
Validate, publish and deploy Gramps Web / validate (push) Failing after 29m16s
Validate, publish and deploy Gramps Web / publish (push) Skipped
Validate, publish and deploy Gramps Web / deploy (push) Skipped
Introduce helm chart and CI and CD
2026-09-06 11:26:19 +02:00

91 lines
3.1 KiB
YAML

{{- if .Values.worker.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "gramps-web.workerName" . }}
labels:
{{- include "gramps-web.labels" . | nindent 4 }}
app.kubernetes.io/component: worker
spec:
replicas: {{ .Values.worker.replicaCount }}
selector:
matchLabels:
app: {{ include "gramps-web.workerName" . }}
template:
metadata:
labels:
app: {{ include "gramps-web.workerName" . }}
{{- include "gramps-web.labels" . | nindent 8 }}
app.kubernetes.io/component: worker
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
checksum/app-secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "gramps-web.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: worker
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: [celery]
args:
- -A
- gramps_webapi.celery
- worker
- --loglevel=INFO
- --concurrency={{ .Values.worker.concurrency }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
{{- include "gramps-web.env" . | nindent 12 }}
{{- if .Values.worker.startupProbe.enabled }}
startupProbe:
{{- omit .Values.worker.startupProbe "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.worker.readinessProbe.enabled }}
readinessProbe:
{{- omit .Values.worker.readinessProbe "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.worker.livenessProbe.enabled }}
livenessProbe:
{{- omit .Values.worker.livenessProbe "enabled" | toYaml | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.worker.resources | nindent 12 }}
volumeMounts:
{{- include "gramps-web.volumeMounts" . | nindent 12 }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ default (printf "%s-data" (include "gramps-web.fullname" .)) .Values.persistence.existingClaim }}
{{- else }}
emptyDir: {}
{{- end }}
- name: tmp
emptyDir: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}