Try to run init container as root

This commit is contained in:
Micke Nordin 2023-03-29 11:34:01 +02:00
parent abd64c96ee
commit 20331e2338
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -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