django-helm-chart/templates/worker-deployment.yaml
2020-02-02 13:12:55 -05:00

54 lines
1.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "glitchtip.fullname" . }}-worker
labels:
{{- include "glitchtip.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.image.replicaCount }}
selector:
matchLabels:
{{- include "glitchtip.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "glitchtip.selectorLabels" . | nindent 8 }}
annotations:
checksum/secrets.yaml: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.worker.resources | nindent 12 }}
env:
- name: DEBUG
value: "False"
- name: STATIC_URL
value: /
- name: SERVER_ROLE
value: "worker"
envFrom:
- secretRef:
name: {{ include "glitchtip.fullname" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}