element-call/helm-chart/templates/deployment.yaml
Johannes Meixner 1bbf689821 Improve Helm Chart
- use official v0.3.13 docker images hosted on GitHub
- load configs for Element-Call (public/config.json), nginx and SSL
  certs through ConfigMaps / PersistentVolumeClaims
2023-07-10 17:21:02 +02:00

87 lines
2.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "element-call.fullname" . }}
labels:
{{- include "element-call.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "element-call.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "element-call.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "element-call.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
- name: https
containerPort: {{ .Values.service.port_https }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: config-volume
mountPath: "{{ .Values.config.path }}"
subPath: "{{ .Values.config.fileName }}"
- name: nginx-volume
mountPath: "{{ .Values.nginx_config.path }}"
- name: ssl-cert-volume
mountPath: "/etc/ssl/certs/"
- name: ssl-key-volume
mountPath: "/etc/ssl/private/"
volumes:
- name: config-volume
configMap:
name: app-config
- name: nginx-volume
configMap:
name: nginx-config
- name: ssl-cert-volume
configMap:
name: ssl-cert
- name: ssl-key-volume
configMap:
name: ssl-key
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}