{{- 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: config: homeserver: http://{{ .Release.Name }}-synapse:8008 postgresql: {{- with .Values.databases.slidingSync }} host: {{ .host | quote }} username: {{ .username | quote }} password: {{ .password | default (derivePassword 1 "long" $.Values.commons.masterPassword "matrix-sliding-sync" "database_password" | b64enc) | quote }} database: {{ .name | quote }} {{- end }} {{- with .Values.commons.tracing }} {{- if .enabled }} opentelemetry: url: {{ .http.endpoint }} {{- end }} {{- end }} ingress: enabled: true annotations: {{- with .Values.commons.ingress.annotations }} {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.ingress.slidingSync.annotations }} {{- toYaml . | nindent 8 }} {{- end }} hosts: - host: {{ include "mycloud-matrix.host.slidingSync" . | quote }} 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: - {{ include "mycloud-matrix.host.slidingSync" . | quote }} {{- 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 */}}