fix(synapse/traefik): Synapse related fixes

This commit is contained in:
kjeld Schouten-Lebbing 2022-01-31 16:54:22 +01:00
parent b9582b8a35
commit d65a86aeb6
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
5 changed files with 32 additions and 4 deletions

View File

@ -22,7 +22,7 @@ sources:
- https://github.com/traefik/traefik-helm-chart
- https://traefik.io/
type: application
version: 10.0.44
version: 10.0.45
annotations:
truecharts.org/catagories: |
- network

View File

@ -0,0 +1,25 @@
{{- $values := .Values }}
{{- $namespace := ( printf "ix-%s" .Release.Name ) }}
{{- if or ( not .Values.ingressClass.enabled ) ( and ( .Values.ingressClass.enabled ) ( .Values.ingressClass.isDefaultClass ) ) }}
{{- $namespace = "default" }}
{{- end }}
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: tc-synapse-headers
namespace: {{ $namespace }}
spec:
headers:
accesscontrolalloworigin: '*'
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: tc-synapse-chain
namespace: {{ $namespace }}
spec:
chain:
middlewares:
- name: tc-synapse-headers

View File

@ -24,7 +24,7 @@ maintainers:
name: synapse
sources: []
type: application
version: 0.0.8
version: 0.0.9
annotations:
truecharts.org/catagories: |
- cloud

View File

@ -11,7 +11,7 @@ metadata:
rollme: {{ randAlphaNum 5 | quote }}
stringData:
{{- $previous := lookup "v1" "Secret" .Release.Namespace "synapse-secret" }}
{{- $msk := "" }}
{{- $msk = randAlphaNum 50 }}
secret.yaml: |
{{- if .Values.mail.enabled }}
email:
@ -43,7 +43,7 @@ stringData:
{{- if $previous }}
{{- $msk = ( index $previous.data "macaroon_secret_key" ) }}
{{- else }}
{{- $msk = randAlphaNum 50 }}
{{- end }}
macaroon_secret_key: {{ $msk }}

View File

@ -7,5 +7,8 @@
{{/* Render secret for synapse */}}
{{- include "synapse.secret" . }}
{{- $newMiddlewares := append .Values.ingress.main.fixedMiddlewares "tc-synapse-chain" }}
{{- $_ := set .Values.ingress.main "fixedMiddlewares" $newMiddlewares -}}
{{/* Render the templates */}}
{{ include "common.postSetup" . }}