aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'charts/mirum/templates/server-deployment.yaml')
-rw-r--r--charts/mirum/templates/server-deployment.yaml142+0 −142
1 files changed, 0 insertions, 142 deletions
diff --git a/charts/mirum/templates/server-deployment.yaml b/charts/mirum/templates/server-deployment.yaml
deleted file mode 100644
--- a/charts/mirum/templates/server-deployment.yaml
+++ /dev/null
@@ -1,142 +0,0 @@
-# SPDX-FileCopyrightText: 2026 Nikolay Govorov
-# SPDX-License-Identifier: AGPL-3.0-or-later
-
-{{- if and .Values.server.enabled (ne (int .Values.server.replicaCount) 1) }}
-{{- fail "mirum: server.replicaCount must be 1 while the task queue is process-local" }}
-{{- end }}
-{{- if and .Values.server.enabled .Values.server.postgresqlMtls.enabled (not .Values.server.serviceAccountName) }}
-{{- fail "mirum: server.serviceAccountName is required when server.postgresqlMtls.enabled=true" }}
-{{- end }}
-{{- if .Values.server.enabled }}
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: {{ include "mirum.fullname" . }}-server
- labels:
- {{- include "mirum.componentLabels" (dict "root" . "component" "server") | nindent 4 }}
-spec:
- replicas: {{ .Values.server.replicaCount }}
- strategy:
- type: Recreate
- selector:
- matchLabels:
- {{- include "mirum.selectorLabels" (dict "root" . "component" "server") | nindent 6 }}
- template:
- metadata:
- annotations:
- {{- with .Values.server.podAnnotations }}
- {{- toYaml . | nindent 8 }}
- {{- end }}
- labels:
- {{- include "mirum.selectorLabels" (dict "root" . "component" "server") | nindent 8 }}
- {{- with .Values.server.podLabels }}
- {{- toYaml . | nindent 8 }}
- {{- end }}
- spec:
- automountServiceAccountToken: false
- {{- with .Values.server.serviceAccountName }}
- serviceAccountName: {{ . | quote }}
- {{- end }}
- terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
- securityContext:
- runAsNonRoot: true
- runAsUser: 10000
- runAsGroup: 10000
- fsGroup: 10000
- fsGroupChangePolicy: OnRootMismatch
- {{- with .Values.imagePullSecrets }}
- imagePullSecrets:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- containers:
- - name: server
- image: {{ include "mirum.image" (dict "root" . "image" .Values.server.image) | quote }}
- imagePullPolicy: {{ .Values.server.image.pullPolicy }}
- args: ["daemon", "--config=/etc/mirum/secret/config.yaml"]
- securityContext:
- allowPrivilegeEscalation: false
- capabilities:
- drop: [ALL]
- readOnlyRootFilesystem: true
- ports:
- - name: web
- containerPort: {{ .Values.server.webPort }}
- - name: grpc
- containerPort: {{ .Values.server.grpcPort }}
- {{- with .Values.server.extraEnv }}
- env:
- {{- toYaml . | nindent 12 }}
- {{- end }}
- startupProbe:
- tcpSocket: { port: web }
- failureThreshold: 30
- periodSeconds: 2
- readinessProbe:
- tcpSocket: { port: web }
- livenessProbe:
- tcpSocket: { port: web }
- periodSeconds: 20
- resources:
- {{- toYaml .Values.server.resources | nindent 12 }}
- volumeMounts:
- - name: config
- mountPath: /etc/mirum/secret
- readOnly: true
- {{- with .Values.server.grpcTls.existingSecret }}
- - name: grpc-tls
- mountPath: /etc/mirum/grpc-tls
- readOnly: true
- {{- end }}
- {{- if .Values.server.postgresqlMtls.enabled }}
- - name: postgresql-tls
- mountPath: {{ .Values.server.postgresqlMtls.mountPath }}
- readOnly: true
- {{- end }}
- - name: run
- mountPath: /run/mirum-server
- volumes:
- - name: config
- secret:
- secretName: {{ .Values.server.existingSecret }}
- defaultMode: 0440
- {{- with .Values.server.grpcTls.existingSecret }}
- - name: grpc-tls
- secret:
- secretName: {{ . }}
- defaultMode: 0440
- {{- end }}
- {{- if .Values.server.postgresqlMtls.enabled }}
- - name: postgresql-tls
- csi:
- driver: csi.cert-manager.io
- readOnly: true
- volumeAttributes:
- csi.cert-manager.io/issuer-name: {{ required "mirum: server.postgresqlMtls.issuerName is required" .Values.server.postgresqlMtls.issuerName | quote }}
- csi.cert-manager.io/issuer-kind: {{ .Values.server.postgresqlMtls.issuerKind | quote }}
- csi.cert-manager.io/common-name: {{ required "mirum: server.postgresqlMtls.commonName is required" .Values.server.postgresqlMtls.commonName | quote }}
- csi.cert-manager.io/uri-sans: {{ .Values.server.postgresqlMtls.uriSan | quote }}
- csi.cert-manager.io/key-algorithm: "ECDSA"
- csi.cert-manager.io/key-size: "256"
- csi.cert-manager.io/key-encoding: "PKCS8"
- csi.cert-manager.io/key-usages: "digital signature,client auth"
- csi.cert-manager.io/duration: {{ .Values.server.postgresqlMtls.duration | quote }}
- csi.cert-manager.io/renew-before: {{ .Values.server.postgresqlMtls.renewBefore | quote }}
- csi.cert-manager.io/fs-group: {{ .Values.server.postgresqlMtls.fsGroup | quote }}
- {{- end }}
- - name: run
- emptyDir: {}
- {{- with .Values.server.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.server.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.server.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
-{{- end }}
-
-# vim: set filetype=helm: