diff --git a/kustomizations/website/files/matrix/client b/kustomizations/website/files/matrix/client new file mode 100644 index 0000000..f2ee293 --- /dev/null +++ b/kustomizations/website/files/matrix/client @@ -0,0 +1,8 @@ +{ + "m.homeserver": { + "base_url": "https://distrust.ems.host" + }, + "m.identity_server": { + "base_url": "https://vector.im" + } +} diff --git a/kustomizations/website/files/matrix/server b/kustomizations/website/files/matrix/server new file mode 100644 index 0000000..f81721e --- /dev/null +++ b/kustomizations/website/files/matrix/server @@ -0,0 +1,3 @@ +{ + "m.server": "distrust.ems.host:443" +} diff --git a/kustomizations/website/ingress.yaml b/kustomizations/website/ingress.yaml index a27b26b..3556e8e 100644 --- a/kustomizations/website/ingress.yaml +++ b/kustomizations/website/ingress.yaml @@ -19,6 +19,13 @@ spec: name: wellknown-openpgp port: number: 80 + - path: /.well-known/matrix + pathType: Prefix + backend: + service: + name: wellknown-matrix + port: + number: 80 - path: / pathType: Prefix backend: diff --git a/kustomizations/website/kustomization.yaml b/kustomizations/website/kustomization.yaml index 4bb064a..2387857 100644 --- a/kustomizations/website/kustomization.yaml +++ b/kustomizations/website/kustomization.yaml @@ -10,3 +10,7 @@ configMapGenerator: - name: openpgp-keys files: - keys/88823A75ECAA786B0FF38B148E401478A3FBEF72.asc +- name: wellknown-matrix + files: + - files/matrix/client + - files/matrix/server diff --git a/kustomizations/website/wellknown.yaml b/kustomizations/website/wellknown.yaml index f0b0bc8..b7f39fb 100644 --- a/kustomizations/website/wellknown.yaml +++ b/kustomizations/website/wellknown.yaml @@ -42,6 +42,50 @@ spec: configMap: name: openpgp-keys --- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wellknown-matrix +spec: + replicas: 2 + selector: + matchLabels: + app: wellknown-matrix + template: + metadata: + labels: + app: wellknown-matrix + spec: + initContainers: + - name: copy-files + image: nginx + command: ["sh"] + args: + - -c + - |- + mkdir -p /output/.well-known/matrix + cp /input/client /output/.well-known/matrix + cp /input/server /output/.well-known/matrix + volumeMounts: + - name: data + mountPath: /output + - name: wellknown + mountPath: /input + containers: + - name: wellknown-openpgp + image: nginx + ports: + - containerPort: 80 + volumeMounts: + - name: data + mountPath: /usr/share/nginx/html + volumes: + - name: data + emptyDir: {} + - name: wellknown + configMap: + name: wellknown-matrix +--- apiVersion: v1 kind: Service metadata: @@ -53,3 +97,15 @@ spec: targetPort: 80 selector: app: wellknown-openpgp +--- +apiVersion: v1 +kind: Service +metadata: + name: wellknown-matrix +spec: + ports: + - name: http + port: 80 + targetPort: 80 + selector: + app: wellknown-matrix