k8s-manifests/customers/base/nextcloud-deployment.yml

125 lines
3.6 KiB
YAML
Raw Normal View History

kind: StatefulSet
apiVersion: apps/v1
metadata:
name: customer-node
labels:
app: customer-node
spec:
replicas: 1
selector:
matchLabels:
app: customer-node
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: customer-node
2023-05-04 13:14:44 +02:00
kano: micke
spec:
restartPolicy: Always
initContainers:
- image: docker.sunet.se/sunet/docker-jinja:latest
name: init-config
volumeMounts:
- name: nextcloud-config
mountPath: /tmp/config.php.template
subPath: config.php
- name: nextcloud-data
mountPath: /var/www/html/config
subPath: config
envFrom:
- configMapRef:
name: nextcloud-env
- secretRef:
name: nextcloud-secrets
command: ["/bin/bash", "-c", "/usr/bin/j2 -f env -o /var/www/html/config/config.php /tmp/config.php.template"]
containers:
- name: customer
image: nextcloud-custom-image
volumeMounts:
2025-01-24 18:05:48 +01:00
- name: nextcloud-data
mountPath: /var/www/html/config/
subPath: config
2023-04-03 15:50:05 +02:00
- name: apache-config
2023-04-03 12:42:48 +02:00
mountPath: /etc/apache2/sites-enabled/000-default.conf
subPath: 000-default.conf
2023-04-03 16:01:28 +02:00
- name: script-config
2023-04-03 15:23:47 +02:00
mountPath: /usr/local/bin/nc-upgrade
subPath: nc-upgrade
2023-04-03 15:50:05 +02:00
- name: apache-php-config
2023-04-03 15:23:47 +02:00
mountPath: /etc/php/8.0/apache2/php.ini
2023-04-03 15:50:05 +02:00
subPath: php.ini
- name: apcu-config
2023-04-03 15:23:47 +02:00
mountPath: /etc/php/8.0/mods-available/apcu.ini
subPath: apcu.ini
2023-04-03 15:50:05 +02:00
- name: cli-php-config
2023-04-03 15:23:47 +02:00
mountPath: /etc/php/8.0/cli/php.ini
2023-04-03 16:04:12 +02:00
subPath: php.ini
2025-01-24 18:05:48 +01:00
resources:
limits:
cpu: 2000m
memory: 2048Mi
requests:
cpu: 1000m
memory: 512Mi
readinessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 10
periodSeconds: 60
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 20
periodSeconds: 180
ports:
- containerPort: 80
name: nextcloud-http
command: ["/bin/bash"]
args: ["-c", "apachectl -D FOREGROUND"]
lifecycle:
postStart:
exec:
command: ["/bin/bash", "-c", "/usr/local/bin/nc-upgrade"]
volumes:
2023-04-03 16:01:28 +02:00
- name: script-config
2023-04-03 09:46:00 +02:00
configMap:
2023-04-03 15:23:47 +02:00
name: script-configmap
2023-04-03 09:46:00 +02:00
items:
2023-04-03 15:50:05 +02:00
- key: "nc-upgrade"
2023-04-03 09:55:55 +02:00
path: "nc-upgrade"
2023-04-03 09:46:00 +02:00
defaultMode: 0744
2023-04-03 15:50:05 +02:00
- name: apache-php-config
configMap:
name: apache-php-configmap
items:
- key: "php.ini"
path: "php.ini"
- name: apcu-config
configMap:
name: apcu-configmap
items:
- key: "apcu.ini"
path: "apcu.ini"
- name: cli-php-config
configMap:
name: cli-php-configmap
items:
- key: "php.ini"
path: "php.ini"
- name: apache-config
configMap:
name: apache-configmap
items:
- key: "000-default.conf"
path: "000-default.conf"
2023-04-03 15:23:47 +02:00
- name: nextcloud-config
configMap:
name: nextcloud-configmap
items:
2023-04-03 15:23:47 +02:00
- key: "config.php"
path: "config.php"
- name: nextcloud-data
emptyDir: {}