{{- if .Values.matrix.delegation.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx-deployment labels: app: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx-deployment spec: replicas: {{ include "matrix-synapse.replicas" (dict "scaleDown" .Values.scaleDown "replicas" .Values.matrix.delegation.replicas) }} selector: matchLabels: app: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx-deployment template: metadata: labels: app: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx-deployment spec: automountServiceAccountToken: false securityContext: {{- toYaml .Values.matrix.delegation.securityContext.pod | nindent 8 }} containers: - name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx image: "{{ .Values.matrix.delegation.image.repository }}:{{ .Values.matrix.delegation.image.tag }}" securityContext: {{- toYaml .Values.matrix.delegation.securityContext.container | nindent 12 }} ports: - containerPort: 8080 name: http volumeMounts: - name: nginx-config mountPath: /etc/nginx/nginx.conf subPath: nginx.conf # The mounted nginx.conf points the pid file and all temp paths to # /tmp, so a single writable emptyDir suffices with a read-only # root filesystem. - name: tmp mountPath: /tmp resources: {{- include "matrix-synapse.resources" .Values.matrix.delegation.resources | nindent 12 }} readinessProbe: {{- toYaml .Values.matrix.delegation.readinessProbe | nindent 12 }} livenessProbe: {{- toYaml .Values.matrix.delegation.livenessProbe | nindent 12 }} startupProbe: {{- toYaml .Values.matrix.delegation.startupProbe | nindent 12 }} volumes: - name: tmp emptyDir: {} - name: nginx-config configMap: name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx-configmap items: - key: nginx.conf path: nginx.conf {{- end }}