[apps/matrix] further cleanup

This commit is contained in:
Nico Schottelius 2021-12-21 13:00:48 +01:00
parent 58be88f40a
commit 54706c382e
4 changed files with 52 additions and 56 deletions

View file

@ -18,6 +18,8 @@
* Needs config: /app/config.json
* Needs FQDN for HTTPS / nginx
* Maybe limit the builtin webserver to localhost?
* Configmap to /etc/nginx/conf.d/default.conf
* Entrypoint `nginx -g daemon off`D
To add:

View file

@ -0,0 +1,50 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-matrix-element-web
spec:
selector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
spec:
containers:
- name: element-web
image: vectorim/element-web:{{ .Values.elementWebVersion }}
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-element-web
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
spec:
type: ClusterIP
ports:
# Required for letsencrypt
- port: 80
name: http
selector:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-element-web
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
data:
{{ tpl (.Files.Get "element-web/nginx-default.conf") . | indent 8 }}

View file

@ -1,42 +1,3 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-matrix-element-web
spec:
selector:
matchLabels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
spec:
containers:
- name: element-web
image: vectorim/element-web:{{ .Values.elementWebVersion }}
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-element-web
labels:
app: {{ .Release.Name }}-element-web
spec:
type: ClusterIP
ports:
# Required for letsencrypt
- port: 80
name: http
selector:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -72,10 +33,6 @@ spec:
mountPath: "/baseconfig"
containers:
- name: matrix
# SYNAPSE_CONFIG_DIR: where additional configs are placed -> postgres-db.yaml
# SYNAPSE_CONFIG_PATH: the initial config
# log.yaml -> same dir as postgres-db.yaml
# /data = persistent storage
image: ungleich/ungleich-matrix-synapse:{{ .Values.synapseVersion }}
imagePullPolicy: Always
ports:

View file

@ -1,13 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ tpl .Values.identifier . }}-test-connection"
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['https://{{ tpl .Values.fqdn . }}']
restartPolicy: Never