summaryrefslogtreecommitdiff
path: root/roles/apps/etherpad-lite/templates/pod-spec-with-mariadb.yml.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-06-30 16:30:57 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-06-30 16:30:57 +0200
commitc633dbb33d1eec0dd8f4284456e0d574fb836eae (patch)
tree57e619725ac99364e74112fc401f98e4a919ca03 /roles/apps/etherpad-lite/templates/pod-spec-with-mariadb.yml.j2
parentapps/collabora/code: migrate to new standalone pod role (diff)
apps/etherpad-lite: migrate to new standalone pod role
Diffstat (limited to 'roles/apps/etherpad-lite/templates/pod-spec-with-mariadb.yml.j2')
-rw-r--r--roles/apps/etherpad-lite/templates/pod-spec-with-mariadb.yml.j249
1 files changed, 49 insertions, 0 deletions
diff --git a/roles/apps/etherpad-lite/templates/pod-spec-with-mariadb.yml.j2 b/roles/apps/etherpad-lite/templates/pod-spec-with-mariadb.yml.j2
new file mode 100644
index 00000000..f608d6ab
--- /dev/null
+++ b/roles/apps/etherpad-lite/templates/pod-spec-with-mariadb.yml.j2
@@ -0,0 +1,49 @@
+securityContext:
+ allowPrivilegeEscalation: false
+containers:
+- name: etherpad-lite
+ image: spreadspace/etherpad-lite:{{ item.value.version }}
+ # securityContext:
+ # runAsUser: {{ etherpad_lite_app_uid }}
+ # runAsGroup: {{ etherpad_lite_app_gid }}
+ resources:
+ limits:
+ memory: "4Gi"
+ volumeMounts:
+ - name: config
+ mountPath: /opt/etherpad-lite/settings.json
+ subPath: settings.json
+ readOnly: true
+ ports:
+ - containerPort: 9001
+ hostPort: {{ item.value.port }}
+ hostIP: 127.0.0.1
+- name: database
+ image: "mariadb:{{ item.value.database.version }}"
+ securityContext:
+ runAsUser: {{ etherpad_lite_db_uid }}
+ runAsGroup: {{ etherpad_lite_db_gid }}
+ resources:
+ limits:
+ memory: "4Gi"
+ env:
+ - name: MYSQL_RANDOM_ROOT_PASSWORD
+ value: "true"
+ - name: MYSQL_DATABASE
+ value: etherpad-lite
+ - name: MYSQL_USER
+ value: etherpad-lite
+ - name: MYSQL_PASSWORD
+ value: "{{ item.value.database.password }}"
+ volumeMounts:
+ - name: database
+ mountPath: /var/lib/mysql
+volumes:
+- name: config
+ hostPath:
+ path: "{{ etherpad_lite_base_path }}/{{ item.key }}/config/"
+ type: Directory
+- name: database
+ hostPath:
+ path: "{{ etherpad_lite_base_path }}/{{ item.key }}/{{ item.value.database.type }}"
+ type: Directory