feat(matrix-synapse): added delegation
This commit is contained in:
6 files changed
+111
-1
No files matched your search
@@ -2,7 +2,7 @@ apiVersion: v2
|
|||||||
name: matrix-synapse
|
name: matrix-synapse
|
||||||
description: A Helm chart to deploy a Matrix Synapse server on Kubernetes
|
description: A Helm chart to deploy a Matrix Synapse server on Kubernetes
|
||||||
type: application
|
type: application
|
||||||
version: 0.4.2+upv1.149.1
|
version: 1.0.0+upv1.149.1
|
||||||
appVersion: "v1.149.1"
|
appVersion: "v1.149.1"
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: jklein
|
- name: jklein
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{{- if .Values.matrix.delegation.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx-config
|
||||||
|
data:
|
||||||
|
nginx.conf: |
|
||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
location /.well-known/matrix/server {
|
||||||
|
return 200 '{"m.server": "{{ .Values.ingress.domain }}:443"}';
|
||||||
|
add_header Content-Type application/json;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /.well-known/matrix/client {
|
||||||
|
return 200 '{"m.homeserver": {"base_url": "https://{{ .Values.ingress.domain }}"}}';
|
||||||
|
add_header Content-Type application/json;
|
||||||
|
add_header "Access-Control-Allow-Origin" *;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
{{- if .Values.matrix.delegation.enabled }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
|
||||||
|
labels:
|
||||||
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
|
||||||
|
spec:
|
||||||
|
automountServiceAccountToken: false
|
||||||
|
containers:
|
||||||
|
- name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
|
||||||
|
image: "nginx:1.28.3"
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http
|
||||||
|
volumeMounts:
|
||||||
|
- name: nginx-config
|
||||||
|
mountPath: /etc/nginx/nginx.conf
|
||||||
|
subPath: nginx.conf
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "250m"
|
||||||
|
ephemeral-storage: "100Mi"
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "125m"
|
||||||
|
ephemeral-storage: "50Mi"
|
||||||
|
volumes:
|
||||||
|
- name: nginx-config
|
||||||
|
configMap:
|
||||||
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx-config
|
||||||
|
items:
|
||||||
|
- key: nginx.conf
|
||||||
|
path: nginx.conf
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{{- if .Values.matrix.delegation.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-service
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: matrix-federation-nginx
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: http
|
||||||
|
name: http
|
||||||
|
type: ClusterIP
|
||||||
|
{{- end }}
|
||||||
@@ -17,7 +17,24 @@ spec:
|
|||||||
name: http
|
name: http
|
||||||
path: /
|
path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
|
{{- if .Values.matrix.delegation.enabled }}
|
||||||
|
- host: {{ required "If delegation is enabled you must provide a serverUrl" .Values.matrix.delegation.serverUrl }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-service
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
path: /.well-known/matrix
|
||||||
|
pathType: Prefix
|
||||||
|
{{- end }}
|
||||||
tls:
|
tls:
|
||||||
|
{{- if .Values.matrix.delegation.enabled }}
|
||||||
|
- hosts:
|
||||||
|
- {{ required "A Domain/Host must be provided" .Values.matrix.delegation.serverUrl }}
|
||||||
|
secretName: tls-{{ .Release.Name }}-{{ .Chart.Name }}-delegation
|
||||||
|
{{- end }}
|
||||||
- hosts:
|
- hosts:
|
||||||
- {{ required "A Domain/Host must be provided" .Values.ingress.domain }}
|
- {{ required "A Domain/Host must be provided" .Values.ingress.domain }}
|
||||||
secretName: tls-{{ .Release.Name }}-{{ .Chart.Name }}-ingress
|
secretName: tls-{{ .Release.Name }}-{{ .Chart.Name }}-ingress
|
||||||
@@ -2,6 +2,9 @@ matrix:
|
|||||||
serverName: null
|
serverName: null
|
||||||
timezone: UTC
|
timezone: UTC
|
||||||
configSecretRef: null
|
configSecretRef: null
|
||||||
|
delegation:
|
||||||
|
enabled: false
|
||||||
|
serverUrl: null
|
||||||
|
|
||||||
storage:
|
storage:
|
||||||
amount: 10Gi
|
amount: 10Gi
|
||||||
|
|||||||
Reference in new issue
Block a user