From e328d1bb0fe0f08b2f993a5a933307b77ad95c29 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 25 Mar 2020 20:55:53 +0100 Subject: move some roles to app/ --- .../templates/pod-with-mariadb.yml.j2 | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j2 (limited to 'roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j2') diff --git a/roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j2 b/roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j2 new file mode 100644 index 00000000..a4acdd21 --- /dev/null +++ b/roles/apps/etherpad-lite/templates/pod-with-mariadb.yml.j2 @@ -0,0 +1,53 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "etherpad-lite-{{ item.key }}" +spec: + 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 }} + - 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 -- cgit v1.2.3