Select Git revision
deploy-admin.yaml
Janne Mareike Koschinski authored
deploy-admin.yaml 2.71 KiB
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "mailu-helm.fullname" . }}-admin
labels:
component: admin
{{- include "mailu-helm.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
component: admin
{{- include "mailu-helm.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
component: admin
{{- include "mailu-helm.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
- name: data
{{- .Values.volumes.data | nindent 10 }}
- name: dkim
{{- .Values.volumes.dkim | nindent 10 }}
- name: config
configMap:
name: {{ include "mailu-helm.fullname" . }}-admin
defaultMode: 0755
containers:
- name: admin
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "mailu/admin:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "mailu-helm.fullname" . }}
- secretRef:
name: {{ include "mailu-helm.fullname" . }}
env:
- name: SUBNET
valueFrom:
configMapKeyRef:
name: {{ include "mailu-helm.fullname" . }}
key: SUBNET_EXTERNAL
ports:
- name: "http"
containerPort: 80
protocol: "TCP"
resources:
{{- toYaml .Values.admin.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: "/data"
- name: dkim
mountPath: "/dkim"
- name: config
mountPath: "/start.py"
subPath: "start.py"
startupProbe: