helm-charts/conduit/templates/deployment.yaml

135 lines
4.9 KiB
YAML
Raw Normal View History

2023-08-17 23:07:21 +02:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "conduit.fullname" . }}
labels:
{{- include "conduit.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
strategy:
type: Recreate
2023-08-17 23:07:21 +02:00
selector:
matchLabels:
{{- include "conduit.selectorLabels" . | nindent 6 }}
type: conduit
2023-08-17 23:07:21 +02:00
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "conduit.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
type: conduit
2023-08-17 23:07:21 +02:00
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "conduit.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
2024-05-14 13:18:49 +02:00
{{- with .Values.image }}
image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}"
imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }}
2024-05-14 13:18:49 +02:00
{{- end }}
2023-08-17 23:07:21 +02:00
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: "CONDUIT_PORT"
value: {{ .Values.service.port | quote }}
- name: "CONDUIT_ADDRESS"
value: "0.0.0.0"
- name: "CONDUIT_SERVER_NAME"
value: {{ .Values.conduit.server_name | quote }}
2024-02-07 22:36:25 +01:00
- name: "CONDUIT_CONFIG"
value: ""
2023-08-17 23:07:21 +02:00
- name: "CONDUIT_DATABASE_PATH"
value: "/var/lib/matrix-conduit"
- name: "CONDUIT_DATABASE_BACKEND"
value: "rocksdb"
- name: "CONDUIT_ALLOW_CHECK_FOR_UPDATE"
value: "false"
2023-08-17 23:07:21 +02:00
- name: "CONDUIT_ALLOW_REGISTRATION"
value: {{ .Values.conduit.allowRegistration | quote }}
- name: "CONDUIT_ALLOW_ENCRYPTION"
value: {{ .Values.conduit.allowEncryption | quote }}
2023-08-17 23:07:21 +02:00
- name: "CONDUIT_ALLOW_FEDERATION"
value: {{ .Values.conduit.allowFederation | quote }}
- name: "CONDUIT_ALLOW_ROOM_CREATION"
value: {{ .Values.conduit.allowRoomCreation | quote }}
- name: "CONDUIT_ALLOW_UNSTABLE_ROOM_VERSIONS"
value: {{ .Values.conduit.allowUnstableRoomVersions | quote }}
2023-08-17 23:07:21 +02:00
- name: "CONDUIT_TRUSTED_SERVERS"
value: {{ toJson .Values.conduit.trustedServers | quote }}
2023-08-17 23:07:21 +02:00
- name: "CONDUIT_MAX_REQUEST_SIZE"
value: {{ .Values.conduit.maxRequestSize | quote }}
{{- with .Values.conduit.maxConcurrentRequests }}
- name: "CONDUIT_MAX_CONCURRENT_REQUESTS"
value: {{ . | quote }}
{{- end }}
{{- with .Values.conduit.log }}
- name: "CONDUIT_LOG"
value: {{ . | quote }}
{{- end }}
{{- with .Values.conduit.registrationToken }}
- name: "CONDUIT_REGISTRATION_TOKEN"
value: {{ . | quote }}
{{- end }}
{{- with .Values.conduit.wellKnown.client }}
- name: "CONDUIT_WELL_KNOWN_CLIENT"
value: {{ . | quote }}
{{- end }}
{{- with .Values.conduit.wellKnown.server }}
- name: "CONDUIT_WELL_KNOWN_SERVER"
value: {{ . | quote }}
{{- end }}
2023-08-17 23:07:21 +02:00
volumeMounts:
- name: "data"
mountPath: "/var/lib/matrix-conduit"
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: "data"
{{- if .Values.persistence.hostPath }}
hostPath:
type: Directory
path: {{ .Values.persistence.hostPath | quote }}
{{- else if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "conduit.fullname" . }}{{- end }}
{{- else }}
emptyDir: {}
2024-02-07 22:36:25 +01:00
{{- end }}