ungleich-k8s/apps/matrix/templates/element-web.yaml

100 lines
2.9 KiB
YAML
Raw Normal View History

2021-12-21 12:00:48 +00:00
---
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
2021-12-25 09:53:35 +00:00
strategy:
type: Recreate
2021-12-21 12:00:48 +00:00
template:
metadata:
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
2021-12-24 14:22:37 +00:00
annotations:
checksum/config: {{ include (print $.Template.BasePath "/element-web-proxy.yaml") . | sha256sum }}
checksum/config: {{ include (print $.Template.BasePath "/element-web-conf.yaml") . | sha256sum }}
2021-12-21 12:00:48 +00:00
spec:
containers:
2021-12-24 14:22:37 +00:00
- name: nginx
image: ungleich/ungleich-certbot:1.1.1
ports:
- containerPort: 443
name: https
- containerPort: 80
name: http
env:
- name: DOMAIN
value: "{{ tpl .Values.elementWebFQDN . }}"
- name: EMAIL
value: "{{ .Values.email }}"
{{ if eq .Values.letsencryptStaging "no" }}
- name: STAGING
value: "no"
{{ end }}
volumeMounts:
- name: nginx-config-proxy
mountPath: "/nginx-configs"
- name: etcletsencrypt
mountPath: "/etc/letsencrypt"
2021-12-21 12:00:48 +00:00
- name: element-web
2021-12-25 15:04:59 +00:00
command: ["nginx", "-g", "daemon off;" ]
2021-12-21 12:00:48 +00:00
image: vectorim/element-web:{{ .Values.elementWebVersion }}
ports:
2021-12-24 14:22:37 +00:00
- containerPort: 8080
volumeMounts:
- name: nginx-config
mountPath: "/etc/nginx/conf.d/"
2021-12-25 15:04:59 +00:00
- name: elementwebconfig
mountPath: "/usr/share/nginx/html/config.json"
subPath: config.json
2021-12-24 14:22:37 +00:00
volumes:
- name: nginx-config
configMap:
name: {{ .Release.Name }}-element-web-nginx
- name: nginx-config-proxy
configMap:
name: {{ .Release.Name }}-element-web-nginx-proxy
2021-12-25 15:04:59 +00:00
- name: elementwebconfig
configMap:
name: {{ .Release.Name }}-element-web
2021-12-25 09:53:35 +00:00
- name: etcletsencrypt
persistentVolumeClaim:
claimName: {{ .Release.Name }}-element-web-letsencrypt-certs
2021-12-21 12:00:48 +00:00
---
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:
- port: 80
name: http
2021-12-24 14:22:37 +00:00
- port: 443
name: https
2021-12-21 12:00:48 +00:00
selector:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
---
apiVersion: v1
kind: ConfigMap
metadata:
2021-12-24 14:22:37 +00:00
name: {{ .Release.Name }}-element-web-nginx
2021-12-21 12:00:48 +00:00
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: matrix-element-web
data:
2021-12-24 14:22:37 +00:00
{{ tpl (.Files.Glob "element-web-nginx/*").AsConfig . | indent 2 }}