From 20331e23385de8ad70f6c5e6ae1f1c2dad8d29b2 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Wed, 29 Mar 2023 11:34:01 +0200 Subject: [PATCH] Try to run init container as root --- customers/base/nextcloud-deployment.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/customers/base/nextcloud-deployment.yml b/customers/base/nextcloud-deployment.yml index 3918a0e..d882862 100644 --- a/customers/base/nextcloud-deployment.yml +++ b/customers/base/nextcloud-deployment.yml @@ -56,6 +56,9 @@ spec: - name: log-volume mountPath: /var/log/apache2 subPath: apache2 + - name: conf-volume + mountPath: /etc/apache2/mods-enabled + subPath: mods-enabled resources: limits: cpu: 1500m @@ -77,11 +80,13 @@ spec: - containerPort: 8080 name: nextcloud-http command: ["/bin/sh"] - args: ["-c", "rm /etc/apache2/mods-enabled/ssl.load /etc/apache2/mods-enabled/ssl.conf; apachectl -D FOREGROUND"] + args: ["-c", "apachectl -D FOREGROUND"] #command: ["/bin/sh","-c", "apachectl -D FOREGROUND; tail -f /dev/null"] initContainers: - image: docker.sunet.se/sunet/docker-jinja:latest name: init-config + securityContext: + privileged: true volumeMounts: - name: nextcloud-config-template mountPath: /tmp/config.php.template @@ -89,6 +94,9 @@ spec: - name: nextcloud-data mountPath: /var/www/html/config subPath: config + - name: conf-volume + mountPath: /etc/apache2/mods-enabled + subPath: mods-enabled env: - name: GSS_MASTER_URL value: "https://drive.test.sunet.se" @@ -182,7 +190,7 @@ spec: key: "redis_password" - name: SITE_NAME value: "customer.drive.test.sunet.se" - command: ["/bin/sh", "-c", "/usr/bin/j2 -f env -o /var/www/html/config/config.php /tmp/config.php.template"] + command: ["/bin/sh", "-c", "rm /etc/apache2/mods-enabled/ssl.load /etc/apache2/mods-enabled/ssl.conf; /usr/bin/j2 -f env -o /var/www/html/config/config.php /tmp/config.php.template"] volumes: - name: nextcloud-config-template configMap: @@ -217,3 +225,6 @@ spec: - name: log-volume emptyDir: sizeLimit: 500Mi + - name: conf-volume + emptyDir: + sizeLimit: 500Mi