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 appVersion: 1.18.0
type: application type: application
version: 0.1.1 version: 0.1.2
maintainers: maintainers:
- name: Alexander Olofsson - name: Alexander Olofsson
email: ace@haxalot.com 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) }} {{- $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 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -47,27 +47,29 @@ spec:
args: args:
- synapse.app.homeserver - synapse.app.homeserver
env: env:
{{- if .Values.postgresql.enabled }} {{- $postgresPass := include "matrix-synapse.postgresql.password" . }}
{{- if and .Values.postgresql.enabled (not $postgresPass) }}
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ include "matrix-synapse.postgresql.fullname" . }} name: {{ include "matrix-synapse.postgresql.fullname" . }}
key: postgresql-password key: postgresql-password
{{- end }} {{- 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 - name: REDIS_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ include "matrix-synapse.redis.fullname" . }} name: {{ include "matrix-synapse.redis.fullname" . }}
key: redis-password key: redis-password
{{- end }} {{- end }}
{{- with .Values.extraEnv }} {{- with .Values.synapse.extraEnv }}
{{ . | toYaml }} {{ . | toYaml }}
{{- end }} {{- end }}
image: "{{ .Values.image.repository }}:{{ include "matrix-synapse.imageTag" . }}" image: "{{ .Values.image.repository }}:{{ include "matrix-synapse.imageTag" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.synapse.securityContext | nindent 12 }}
ports: ports:
- name: http - name: http
containerPort: 8008 containerPort: 8008
@ -98,7 +100,7 @@ spec:
- name: media - name: media
mountPath: /synapse/data mountPath: /synapse/data
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.synapse.resources | nindent 12 }}
volumes: volumes:
- name: config - name: config
configMap: configMap:
@ -115,7 +117,6 @@ spec:
- name: tmpconf - name: tmpconf
emptyDir: {} emptyDir: {}
- name: media - name: media
{{- $mediaworker := false }} {{- $mediaworker := false }}
{{- range $worker, $config := .Values.workers }} {{- range $worker, $config := .Values.workers }}
{{- if eq $worker "media-repository" }} {{- if eq $worker "media-repository" }}
@ -128,15 +129,15 @@ spec:
{{- else }} {{- else }}
emptyDir: {} emptyDir: {}
{{- end }} {{- end }}
{{- with .Values.nodeSelector }} {{- with .Values.synapse.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.affinity }} {{- with .Values.synapse.affinity }}
affinity: affinity:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.tolerations }} {{- with .Values.synapse.tolerations }}
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- 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") -}} {{- $wkName := include "matrix-synapse.workername" (dict "global" . "worker" "workers") -}}
--- ---
apiVersion: v1 apiVersion: v1
@ -39,3 +47,4 @@ data:
worker_log_config: /synapse/config/log.yaml worker_log_config: /synapse/config/log.yaml
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }}