Try more stuff

This commit is contained in:
Micke Nordin 2023-03-29 10:18:20 +02:00
parent 406df9839f
commit 8e302f0213
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257
2 changed files with 29 additions and 12 deletions

View file

@ -5,7 +5,6 @@ metadata:
data:
000-default.conf: |
LoadModule remoteip_module /usr/lib/apache2/modules/mod_remoteip.so
Listen 8080
<VirtualHost *:8080>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
@ -21,8 +20,8 @@ data:
RemoteIPInternalProxy 37.156.195.22
# TODO: Package 404 for k8s
# ErrorDocument 404 /404.html
# ErrorLog /dev/stderr
# TransferLog /dev/stdout
ErrorLog /dev/stderr
TransferLog /dev/stdout
<Directory /var/www/html/>
LimitRequestBody 0
Require all granted
@ -139,3 +138,5 @@ data:
),
);
ports.conf: |
Listen 8080

View file

@ -27,6 +27,12 @@ spec:
app: customer-node
spec:
restartPolicy: Always
securityContext:
privileged: false
runAsNonRoot: true
allowPrivilegeEscalation: false
runAsUser: 33
runAsGroup: 33
containers:
- name: customer
image: docker.sunet.se/drive/nextcloud-custom:25.0.3.3-4
@ -37,6 +43,9 @@ spec:
- name: apache-config
mountPath: /etc/apache2/sites-enabled/000-default.conf
subPath: 000-default.conf
- name: ports-config
mountPath: /etc/apache2/ports.conf
subPath: ports.conf
resources:
limits:
cpu: 1500m
@ -45,19 +54,20 @@ spec:
cpu: 500m
memory: 256Mi
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 180
periodSeconds: 60
tcpSocket:
port: 8080
initialDelaySeconds: 180
periodSeconds: 60
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 300
periodSeconds: 180
tcpSocket:
port: 8080
initialDelaySeconds: 300
periodSeconds: 180
ports:
- containerPort: 8080
name: nextcloud-http
command: ['/bin/sh', '-c', '/etc/init.d/apache2 start; tail -f /var/log/apache2/error.log']
command: ["apachectl"]
args: ["-D", "FOREGROUND"]
initContainers:
- image: docker.sunet.se/sunet/docker-jinja:latest
name: init-config
@ -175,3 +185,9 @@ spec:
items:
- key: "000-default.conf"
path: "000-default.conf"
- name: ports-config
configMap:
name: nextcloud-configmap
items:
- key: "ports.conf"
path: "ports.conf"