django-helm-chart/templates/web-deployment.yaml
David Burke e935541b40 closer
2020-02-02 17:29:14 -05:00

62 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "glitchtip.fullname" . }}-web
labels:
{{- include "glitchtip.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "glitchtip.selectorLabels" . | nindent 6 }}
role: web
template:
metadata:
labels:
{{- include "glitchtip.selectorLabels" . | nindent 8 }}
role: web
annotations:
checksum/secrets.yaml: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "glitchtip.serviceAccountName" . }}
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 }}
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: DEBUG
value: "False"
- name: STATIC_URL
value: /
- name: ENABLE_SOCIAL_AUTH
value: {{ .Values.enableSocialAuth | quote }}
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 }}