2021-06-20 10:39:39 +00:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2021-06-20 12:58:15 +00:00
|
|
|
name: {{ .Release.Name }}-etherpad
|
2021-06-20 10:39:39 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2021-06-20 13:00:59 +00:00
|
|
|
app: {{ .Release.Name }}-etherpad
|
2021-06-20 10:39:39 +00:00
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2021-06-20 13:00:59 +00:00
|
|
|
app: {{ .Release.Name }}-etherpad
|
|
|
|
use-as-service: {{ .Release.Name }}
|
2021-06-20 10:39:39 +00:00
|
|
|
spec:
|
2021-06-20 12:58:15 +00:00
|
|
|
initContainers:
|
|
|
|
- name: wait-for-cert
|
|
|
|
image: busybox
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- until ls /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem; do sleep 5; done
|
2021-06-20 13:04:52 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: etcletsencrypt
|
|
|
|
mountPath: "/etc/letsencrypt"
|
2021-06-20 10:39:39 +00:00
|
|
|
containers:
|
|
|
|
- name: etherpad
|
|
|
|
image: etherpad/etherpad:1.8.13
|
|
|
|
ports:
|
|
|
|
- containerPort: 9001
|
|
|
|
volumeMounts:
|
|
|
|
- name: etherpadconfig
|
|
|
|
mountPath: "/opt/etherpad-lite/settings.json"
|
|
|
|
subPath: settings.json
|
|
|
|
- name: etcletsencrypt
|
|
|
|
mountPath: "/etc/letsencrypt"
|
2021-06-20 11:08:37 +00:00
|
|
|
- name: data
|
|
|
|
mountPath: "/data"
|
2021-06-20 10:39:39 +00:00
|
|
|
volumes:
|
|
|
|
- name: etcletsencrypt
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ .Release.Name }}-letsencrypt-certs
|
2021-06-20 11:08:37 +00:00
|
|
|
- name: data
|
2021-06-20 10:39:39 +00:00
|
|
|
persistentVolumeClaim:
|
2021-06-20 11:08:37 +00:00
|
|
|
claimName: {{ .Release.Name }}-data
|
2021-06-20 12:58:15 +00:00
|
|
|
- name: etherpadconfig
|
|
|
|
configMap:
|
|
|
|
name: {{ .Release.Name }}-etherpadconfig
|
|
|
|
|
2021-06-20 10:39:39 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2021-06-20 12:58:15 +00:00
|
|
|
name: {{ tpl .Values.identifier . }}
|
2021-06-20 10:39:39 +00:00
|
|
|
labels:
|
2021-06-20 12:58:15 +00:00
|
|
|
app: {{ tpl .Values.identifier . }}
|
2021-06-20 10:39:39 +00:00
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
name: http
|
|
|
|
- port: 443
|
|
|
|
targetPort: 9001
|
|
|
|
name: https
|
|
|
|
selector:
|
2021-06-20 13:00:59 +00:00
|
|
|
use-as-service: {{ .Release.Name }}
|
2021-06-20 10:39:39 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
2021-06-20 12:58:15 +00:00
|
|
|
name: {{ tpl .Values.identifier . }}-etherpadconfig
|
2021-06-20 10:39:39 +00:00
|
|
|
data:
|
|
|
|
{{ tpl (.Files.Glob "etherpad/*").AsConfig . | indent 2 }}
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
2021-06-20 12:58:15 +00:00
|
|
|
name: {{ tpl .Values.identifier . }}-letsencrypt-certs
|
2021-06-20 10:39:39 +00:00
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteMany
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 50Mi
|
|
|
|
storageClassName: rook-cephfs
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
2021-06-20 12:58:15 +00:00
|
|
|
name: {{ tpl .Values.identifier . }}-data
|
2021-06-20 10:39:39 +00:00
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteMany
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 100Mi
|
|
|
|
storageClassName: rook-cephfs
|
|
|
|
---
|
|
|
|
apiVersion: batch/v1
|
|
|
|
kind: Job
|
|
|
|
metadata:
|
2021-06-20 12:58:15 +00:00
|
|
|
name: {{ tpl .Values.identifier . }}-getcert
|
2021-06-20 10:39:39 +00:00
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2021-06-20 13:00:59 +00:00
|
|
|
app: certbot-letsencrypt-getcert
|
|
|
|
use-as-service: {{ .Release.Name }}
|
2021-06-20 10:39:39 +00:00
|
|
|
spec:
|
|
|
|
restartPolicy: Never
|
|
|
|
containers:
|
|
|
|
- name: certbot
|
|
|
|
image: ungleich/ungleich-certbot
|
2021-07-17 15:24:35 +00:00
|
|
|
imagePullPolicy: Always
|
|
|
|
|
2021-06-20 10:39:39 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
env:
|
|
|
|
- name: DOMAIN
|
2021-06-20 12:58:15 +00:00
|
|
|
value: "{{ tpl .Values.fqdn . }}"
|
2021-06-20 10:39:39 +00:00
|
|
|
- name: EMAIL
|
|
|
|
value: "{{ .Values.email }}"
|
2021-06-20 11:08:37 +00:00
|
|
|
{{ if eq .Values.letsencryptStaging "no" }}
|
|
|
|
- name: STAGING
|
|
|
|
value: "no"
|
|
|
|
{{ end }}
|
2021-06-20 10:39:39 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: etcletsencrypt
|
|
|
|
mountPath: "/etc/letsencrypt"
|
|
|
|
volumes:
|
|
|
|
- name: etcletsencrypt
|
|
|
|
persistentVolumeClaim:
|
2021-06-20 12:58:15 +00:00
|
|
|
claimName: {{ tpl .Values.identifier . }}-letsencrypt-certs
|
2021-06-20 10:39:39 +00:00
|
|
|
backoffLimit: 3
|