2023-03-27 11:03:37 +00:00
|
|
|
kind: StatefulSet
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: customer-node
|
|
|
|
labels:
|
|
|
|
app: customer-node
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: customer-node
|
|
|
|
updateStrategy:
|
|
|
|
type: RollingUpdate
|
|
|
|
volumeClaimTemplates:
|
|
|
|
- metadata:
|
|
|
|
name: nextcloud-data
|
|
|
|
spec:
|
|
|
|
storageClassName: mayastor-3
|
|
|
|
accessModes:
|
2023-03-31 11:53:34 +00:00
|
|
|
- ReadWriteOnce
|
2023-03-27 11:03:37 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 1Gi
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: customer-node
|
|
|
|
spec:
|
|
|
|
restartPolicy: Always
|
|
|
|
containers:
|
|
|
|
- name: customer
|
2023-03-31 13:56:49 +00:00
|
|
|
image: docker.sunet.se/drive/nextcloud-custom:25.0.5.2-1
|
2023-03-27 11:03:37 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: nextcloud-data
|
2023-04-03 10:42:48 +00:00
|
|
|
mountPath: /var/www/html/config/
|
2023-03-27 11:03:37 +00:00
|
|
|
subPath: config
|
|
|
|
- name: default-config
|
2023-04-03 10:42:48 +00:00
|
|
|
mountPath: /etc/apache2/sites-enabled/000-default.conf
|
2023-03-27 11:03:37 +00:00
|
|
|
subPath: 000-default.conf
|
|
|
|
- name: hugepage
|
|
|
|
mountPath: /dev/hugepages
|
2023-04-03 07:46:00 +00:00
|
|
|
- name: nc-upgrade
|
2023-04-03 07:55:55 +00:00
|
|
|
mountPath: /usr/local/bin
|
2023-03-27 11:03:37 +00:00
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: 1500m
|
|
|
|
hugepages-2Mi: 2048Mi
|
|
|
|
memory: 2048Mi
|
|
|
|
requests:
|
|
|
|
cpu: 500m
|
|
|
|
hugepages-2Mi: 2048Mi
|
|
|
|
memory: 256Mi
|
|
|
|
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"]
|
2023-04-03 11:08:43 +00:00
|
|
|
args: ["-c", "apachectl -D FOREGROUND"]
|
2023-03-31 13:56:49 +00:00
|
|
|
lifecycle:
|
|
|
|
postStart:
|
|
|
|
exec:
|
2023-04-03 07:46:00 +00:00
|
|
|
command: ["/bin/bash", "-c", "/usr/local/bin/nc-upgrade"]
|
2023-03-27 11:03:37 +00:00
|
|
|
initContainers:
|
|
|
|
- image: docker.sunet.se/sunet/docker-jinja:latest
|
|
|
|
name: init-config
|
|
|
|
volumeMounts:
|
|
|
|
- name: nextcloud-config-template
|
|
|
|
mountPath: /tmp/config.php.template
|
|
|
|
subPath: config.php
|
|
|
|
- name: nextcloud-data
|
|
|
|
mountPath: /var/www/html/config
|
|
|
|
subPath: config
|
2023-04-03 11:03:38 +00:00
|
|
|
- name: apache-php-config
|
2023-04-03 11:08:43 +00:00
|
|
|
mountPath: /etc/php/8.0/apache2/php.ini
|
2023-04-03 13:06:54 +00:00
|
|
|
subPath: apache/php.ini
|
2023-04-03 11:03:38 +00:00
|
|
|
- name: apcu-php-config
|
2023-04-03 11:08:43 +00:00
|
|
|
mountPath: /etc/php/8.0/mods-available/apcu.ini
|
2023-04-03 11:03:38 +00:00
|
|
|
subPath: apcu.ini
|
|
|
|
- name: cli-php-config
|
2023-04-03 11:08:43 +00:00
|
|
|
mountPath: /etc/php/8.0/cli/php.ini
|
2023-04-03 13:06:54 +00:00
|
|
|
subPath: cli/php.ini
|
2023-03-27 11:03:37 +00:00
|
|
|
env:
|
|
|
|
- name: GSS_MASTER_URL
|
|
|
|
value: "https://drive.test.sunet.se"
|
|
|
|
- name: GSS_JWT_KEY
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: gss-secret
|
|
|
|
key: "jwt_key"
|
|
|
|
- name: LOOKUP_SERVER
|
|
|
|
value: "https://lookup.drive.test.sunet.se"
|
|
|
|
- name: MAIL_DOMAIN
|
|
|
|
value: "drive.test.sunet.se"
|
|
|
|
- name: MAIL_FROM_ADDRESS
|
|
|
|
value: "noreply"
|
|
|
|
- name: MAIL_SMTPHOST
|
|
|
|
value: "smtp.sunet.se"
|
|
|
|
- name: MAIL_SMTPNAME
|
|
|
|
value: "noreply@drive.test.sunet.se"
|
|
|
|
- name: MAIL_SMTPPASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: mail-secret
|
|
|
|
key: "smtp_password"
|
|
|
|
- name: MYSQL_DATABASE
|
|
|
|
value: "nextcloud_customer"
|
|
|
|
- name: MYSQL_USER
|
|
|
|
value: "nextcloud_customer"
|
|
|
|
- name: MYSQL_HOST
|
|
|
|
value: "proxysqlcluster.proxysql"
|
|
|
|
- name: MYSQL_PASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: db-secret
|
|
|
|
key: "db_password"
|
|
|
|
- name: MYSQL_PORT
|
|
|
|
value: "6033"
|
|
|
|
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
|
|
|
value: "customer.drive.test.sunet.se"
|
|
|
|
- name: NEXTCLOUD_ADMIN_USER
|
|
|
|
value: admin
|
|
|
|
- name: NEXTCLOUD_VERSION_STRING
|
|
|
|
value: "25.0.3.3"
|
|
|
|
- name: NEXTCLOUD_ADMIN_PASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: nc-secret
|
|
|
|
key: "nc_admin_password"
|
|
|
|
- name: NEXTCLOUD_PASSWORDSALT
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: nc-secret
|
|
|
|
key: "nc_passwordsalt"
|
|
|
|
- name: NEXTCLOUD_INSTANCEID
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: nc-secret
|
|
|
|
key: "nc_instanceid"
|
|
|
|
- name: NEXTCLOUD_SECRET
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: nc-secret
|
|
|
|
key: "nc_secret"
|
|
|
|
- name: OBJECTSTORE_S3_REGION
|
|
|
|
value: "us-east-1"
|
|
|
|
- name: OBJECTSTORE_S3_HOST
|
|
|
|
value: "s3.sto4.safedc.net"
|
|
|
|
- name: OBJECTSTORE_S3_BUCKET
|
|
|
|
value: "primary-customer-drive-test.sunet.se"
|
|
|
|
- name: OBJECTSTORE_S3_KEY
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: s3-secret
|
|
|
|
key: "s3_key"
|
|
|
|
- name: OBJECTSTORE_S3_SECRET
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: s3-secret
|
|
|
|
key: "s3_secret"
|
|
|
|
- name: OBJECTSTORE_S3_USEPATH_STYLE
|
|
|
|
value: "true"
|
|
|
|
- name: OBJECTSTORE_S3_AUTOCREATE
|
|
|
|
value: "true"
|
|
|
|
- name: OBJECTSTORE_S3_SSL
|
|
|
|
value: "true"
|
|
|
|
- name: REDIS_HOST
|
|
|
|
value: "redis"
|
|
|
|
- name: SITE_NAME
|
|
|
|
value: "customer.drive.test.sunet.se"
|
2023-04-03 11:08:43 +00:00
|
|
|
command: ["/bin/bash", "-c", "/usr/bin/j2 -f env -o /var/www/html/config/config.php /tmp/config.php.template"]
|
2023-03-27 11:03:37 +00:00
|
|
|
volumes:
|
|
|
|
- name: nextcloud-config-template
|
|
|
|
configMap:
|
|
|
|
name: nextcloud-configmap
|
|
|
|
items:
|
|
|
|
- key: "config.php"
|
|
|
|
path: "config.php"
|
2023-04-03 07:46:00 +00:00
|
|
|
- name: nc-upgrade
|
|
|
|
configMap:
|
|
|
|
name: nextcloud-configmap
|
|
|
|
items:
|
|
|
|
- key: "nc-upgrade.sh"
|
2023-04-03 07:55:55 +00:00
|
|
|
path: "nc-upgrade"
|
2023-04-03 07:46:00 +00:00
|
|
|
defaultMode: 0744
|
2023-03-27 11:03:37 +00:00
|
|
|
- name: default-config
|
|
|
|
configMap:
|
|
|
|
name: nextcloud-configmap
|
|
|
|
items:
|
|
|
|
- key: "000-default.conf"
|
|
|
|
path: "000-default.conf"
|
2023-04-03 10:08:26 +00:00
|
|
|
- name: cli-php-config
|
|
|
|
configMap:
|
|
|
|
name: nextcloud-configmap
|
|
|
|
items:
|
|
|
|
- key: "cli.php.ini"
|
|
|
|
path: "cli.php.ini"
|
|
|
|
- name: apcu-php-config
|
|
|
|
configMap:
|
|
|
|
name: nextcloud-configmap
|
|
|
|
items:
|
|
|
|
- key: "apcu.ini"
|
|
|
|
path: "apcu.ini"
|
|
|
|
- name: apache-php-config
|
|
|
|
configMap:
|
|
|
|
name: nextcloud-configmap
|
|
|
|
items:
|
|
|
|
- key: "apache.php.ini"
|
|
|
|
path: "apache.php.ini"
|
2023-04-03 10:48:32 +00:00
|
|
|
- name: cli-php-config
|
|
|
|
configMap:
|
|
|
|
name: nextcloud-configmap
|
|
|
|
items:
|
|
|
|
- key: "cli.php.ini"
|
|
|
|
path: "cli.php.ini"
|
2023-03-27 11:03:37 +00:00
|
|
|
- name: hugepage
|
|
|
|
emptyDir:
|
|
|
|
medium: HugePages
|