{{- if .Values.ingress.element.enabled }} --- apiVersion: source.toolkit.fluxcd.io/v1beta2 kind: HelmRepository metadata: name: "{{ .Release.Name }}-element-web" spec: url: https://ananace.gitlab.io/charts interval: 10m --- apiVersion: helm.toolkit.fluxcd.io/v2beta2 kind: HelmRelease metadata: name: "{{ .Release.Name }}-element-web" spec: chart: spec: sourceRef: kind: HelmRepository name: "{{ .Release.Name }}-element-web" chart: "element-web" 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: {{- $serverDomain := .Values.server.host | default .Values.commons.ingress.domain }} {{- $serverHost := .Values.ingress.server.host | default (printf "matrix.%s" .Values.commons.ingress.domain) }} {{- $host := .Values.ingress.element.host | default (printf "element.%s" .Values.commons.ingress.domain) }} image: repository: docker.io/vectorim/element-web defaultServer: url: https://{{ $serverHost }} name: {{ $serverDomain }} config: sso_redirect_options: on_welcome_page: true ingress: enabled: true annotations: {{- with .Values.commons.ingress.annotations }} {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.ingress.annotations }} {{- toYaml . | nindent 8 }} {{- end }} hosts: - {{ $host | quote }} {{- if .Values.commons.ingress.tls.enabled }} tls: {{- with .Values.commons.ingress.tls.override }} {{- toYaml . | nindent 8 }} {{- else }} - secretName: "mycloud-matrix-element-cert" hosts: - "{{ $host }}" {{- end }} {{- end }} {{- end }}