matrix before refactor big

This commit is contained in:
Nico Schottelius 2021-07-17 22:07:30 +02:00
parent 9bc8f81c93
commit f70d5a8291

View file

@ -15,15 +15,15 @@ spec:
use-as-service: {{ .Release.Name }} use-as-service: {{ .Release.Name }}
spec: spec:
initContainers: initContainers:
- name: wait-for-cert # - name: wait-for-cert
image: busybox # image: busybox
command: # command:
- sh # - sh
- -c # - -c
- until ls /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem; do sleep 2; done # - until ls /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem; do sleep 2; done
volumeMounts: # volumeMounts:
- name: etcletsencrypt # - name: etcletsencrypt
mountPath: "/etc/letsencrypt" # mountPath: "/etc/letsencrypt"
- name: generate-matrix-signing-key - name: generate-matrix-signing-key
image: ungleich/ungleich-matrix-synapse:{{ .Values.synapseVersion }} image: ungleich/ungleich-matrix-synapse:{{ .Values.synapseVersion }}
command: command:
@ -41,6 +41,22 @@ spec:
- name: matrix-config - name: matrix-config
mountPath: "/baseconfig" mountPath: "/baseconfig"
containers: containers:
- name: certbot
image: ungleich/ungleich-certbot
ports:
- containerPort: 80
env:
- name: DOMAIN
value: "{{ tpl .Values.fqdn . }}"
- name: EMAIL
value: "{{ .Values.email }}"
{{ if eq .Values.letsencryptStaging "no" }}
- name: STAGING
value: "no"
{{ end }}
volumeMounts:
- name: etcletsencrypt
mountPath: "/etc/letsencrypt"
# This container will only start *after* the cert has been placed # This container will only start *after* the cert has been placed
- name: debug - name: debug
image: alpine:latest image: alpine:latest
@ -108,6 +124,9 @@ spec:
- name: postgres-data - name: postgres-data
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ tpl .Values.identifier . }}-postgres-data claimName: {{ tpl .Values.identifier . }}-postgres-data
- name: postgres-vars
secret:
secretName: {{ tpl .Values.identifier . }}-postgres-config
- name: nginx-config - name: nginx-config
configMap: configMap:
name: {{ tpl .Values.identifier . }}-nginx-config name: {{ tpl .Values.identifier . }}-nginx-config
@ -191,41 +210,41 @@ spec:
storage: 500Mi storage: 500Mi
storageClassName: rook-ceph-block storageClassName: rook-ceph-block
--- ---
apiVersion: batch/v1 # apiVersion: batch/v1
kind: Job # kind: Job
metadata: # metadata:
name: {{ tpl .Values.identifier . }}-getcert # name: {{ tpl .Values.identifier . }}-getcert
spec: # spec:
template: # template:
metadata: # metadata:
labels: # labels:
app: certbot-letsencrypt-getcert # app: certbot-letsencrypt-getcert
use-as-service: {{ .Release.Name }} # use-as-service: {{ .Release.Name }}
spec: # spec:
restartPolicy: Never # restartPolicy: Never
containers: # containers:
- name: certbot # - name: certbot
image: ungleich/ungleich-certbot # image: ungleich/ungleich-certbot
ports: # ports:
- containerPort: 80 # - containerPort: 80
env: # env:
- name: DOMAIN # - name: DOMAIN
value: "{{ tpl .Values.fqdn . }}" # value: "{{ tpl .Values.fqdn . }}"
- name: EMAIL # - name: EMAIL
value: "{{ .Values.email }}" # value: "{{ .Values.email }}"
{{ if eq .Values.letsencryptStaging "no" }} # {{ if eq .Values.letsencryptStaging "no" }}
- name: STAGING # - name: STAGING
value: "no" # value: "no"
{{ end }} # {{ end }}
volumeMounts: # volumeMounts:
- name: etcletsencrypt # - name: etcletsencrypt
mountPath: "/etc/letsencrypt" # mountPath: "/etc/letsencrypt"
volumes: # volumes:
- name: etcletsencrypt # - name: etcletsencrypt
persistentVolumeClaim: # persistentVolumeClaim:
claimName: {{ tpl .Values.identifier . }}-letsencrypt-certs # claimName: {{ tpl .Values.identifier . }}-letsencrypt-certs
backoffLimit: 3 # backoffLimit: 3
--- #---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@ -258,7 +277,7 @@ metadata:
name: {{ tpl .Values.identifier . }}-postgres-config name: {{ tpl .Values.identifier . }}-postgres-config
annotations: annotations:
secret-generator.v1.mittwald.de/autogenerate: POSTGRES_PASSWORD secret-generator.v1.mittwald.de/autogenerate: POSTGRES_PASSWORD
stringdata: stringData:
POSTGRES_USER: "matrix-synapse" POSTGRES_USER: "matrix-synapse"
POSTGRES_DB: "matrix-synapse" POSTGRES_DB: "matrix-synapse"
POSTGRES_HOST: "localhost" POSTGRES_HOST: "localhost"