{{- if .Values.server.slidingSync.enabled }} --- apiVersion: helm.toolkit.fluxcd.io/v2beta2 kind: HelmRelease metadata: name: "{{ .Release.Name }}-sliding-sync" spec: chart: spec: sourceRef: kind: GitRepository name: "wrenix-helm-charts" namespace: "flux-system" chart: "./matrix-sliding-sync" reconcileStrategy: "Revision" install: {{- toYaml .Values.commons.helm.release.install | nindent 4 }} test: {{- toYaml .Values.commons.helm.release.test | nindent 4 }} upgrade: {{- toYaml .Values.commons.helm.release.upgrade | nindent 4 }} driftDetection: {{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }} interval: 10m values: {{- $host := .Values.ingress.slidingSync.host | default (printf "sliding.matrix.%s" .Values.commons.ingress.domain) }} config: homeserver: http://{{ .Release.Name }}-synapse:8008 logLevel: INFO postgresql: host: {{ .Values.databases.slidingSync.host | quote }} username: {{ .Values.databases.slidingSync.username | quote }} password: {{ .Values.databases.slidingSync.password | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix-sliding-sync" "database_password" | b64enc) | quote }} database: {{ .Values.databases.slidingSync.name | quote }} ingress: enabled: true annotations: {{- with .Values.commons.ingress.annotations }} {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.ingress.annotations }} {{- toYaml . | nindent 8 }} {{- end }} includeServerName: false hosts: - host: "{{ $host }}" paths: - path: "/" pathType: Prefix {{- if .Values.commons.ingress.tls.enabled }} tls: {{- with .Values.commons.ingress.tls.override }} {{- toYaml . | nindent 8 }} {{- else }} - secretName: "mycloud-matrix-sliding-sync-cert" hosts: - "{{ $host }}" {{- end }} {{- end }} prometheus: servicemonitor: enabled: {{ (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }} labels: {{- toYaml .Values.commons.prometheus.monitor.labels | nindent 10 }} {{- end }}{{/* end-if .server.sldingSync.enabled */}}