matrix-synapse: Bugfixes galore

This commit is contained in:
Alexander Olofsson 2020-08-10 12:44:37 +02:00
parent 57359a22d2
commit e6a5fa95fc
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
3 changed files with 21 additions and 11 deletions

View file

@ -5,7 +5,7 @@ description: Matrix reference homeserver
appVersion: 1.18.0
type: application
version: 0.1.1
version: 0.1.2
maintainers:
- name: Alexander Olofsson
email: ace@haxalot.com

View file

@ -1,6 +1,6 @@
# {{- required "A valid .Values.config.serverName is required" .Values.config.serverName -}}
{{- $needsVolumePermissions := and .Values.volumePermissions.enabled (or .Values.persistence.enabled .Values.persistence.existingClaim) }}
---
# Server: {{ required "A valid .Values.config.serverName is required" .Values.config.serverName -}}
apiVersion: apps/v1
kind: Deployment
metadata:
@ -47,27 +47,29 @@ spec:
args:
- synapse.app.homeserver
env:
{{- if .Values.postgresql.enabled }}
{{- $postgresPass := include "matrix-synapse.postgresql.password" . }}
{{- if and .Values.postgresql.enabled (not $postgresPass) }}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "matrix-synapse.postgresql.fullname" . }}
key: postgresql-password
{{- end }}
{{- if and .Values.redis.enabled (default .Values.redis.usePassword true) }}
{{- $redisPass := include "matrix-synapse.redis.password" . }}
{{- if and .Values.redis.enabled (default .Values.redis.usePassword true) (not $redisPass) }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "matrix-synapse.redis.fullname" . }}
key: redis-password
{{- end }}
{{- with .Values.extraEnv }}
{{- with .Values.synapse.extraEnv }}
{{ . | toYaml }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ include "matrix-synapse.imageTag" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- toYaml .Values.synapse.securityContext | nindent 12 }}
ports:
- name: http
containerPort: 8008
@ -98,7 +100,7 @@ spec:
- name: media
mountPath: /synapse/data
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.synapse.resources | nindent 12 }}
volumes:
- name: config
configMap:
@ -115,7 +117,6 @@ spec:
- name: tmpconf
emptyDir: {}
- name: media
{{- $mediaworker := false }}
{{- range $worker, $config := .Values.workers }}
{{- if eq $worker "media-repository" }}
@ -128,15 +129,15 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
{{- with .Values.nodeSelector }}
{{- with .Values.synapse.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.synapse.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.synapse.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -1,3 +1,11 @@
{{- $any := false }}
{{- range $worker, $config := .Values.workers }}
{{- if $config.enabled }}
{{- $any = true }}
{{- end }}
{{- end }}
{{- if $any }}
{{- $wkName := include "matrix-synapse.workername" (dict "global" . "worker" "workers") -}}
---
apiVersion: v1
@ -39,3 +47,4 @@ data:
worker_log_config: /synapse/config/log.yaml
{{- end }}
{{- end }}
{{- end }}