123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: nextcloud
- spec:
- replicas: 1
- selector:
- matchLabels:
- name: nextcloud
- template:
- metadata:
- labels:
- name: nextcloud
- nginx: backend
- redis: client
- spec:
- affinity:
- nodeAffinity:
- preferredDuringSchedulingIgnoredDuringExecution:
- - weight: 1
- preference:
- matchExpressions:
- - key: kubernetes.io/arch
- operator: In
- values:
- - amd64
- containers:
- - name: nextcloud
- image: qdii/nextcloud:29.0.0-apache
- env:
- - name: MYSQL_DATABASE
- value: "nextcloud"
- - name: MYSQL_USER
- value: "nextcloud"
- - name: MYSQL_HOST
- value: "mariadb.mariadb"
- - name: MYSQL_PASSWORD
- valueFrom:
- secretKeyRef:
- name: nextcloud
- key: mariadb-password
- - name: NEXTCLOUD_ADMIN_USER
- value: "qdii"
- - name: NEXTCLOUD_ADMIN_PASSWORD
- valueFrom:
- secretKeyRef:
- name: nextcloud
- key: admin-password
- - name: NEXTCLOUD_TRUSTED_DOMAINS
- value: "dodges.it"
- - name: APACHE_DISABLE_REWRITES
- value: "1"
- - name: TRUSTED_PROXIES
- value: "10.244.0.1/16"
- - name: OVERWRITEHOST
- value: "ng.dodges.it"
- - name: OVERWRITEPROTOCOL
- value: "https"
- - name: REDIS_HOST
- value: "redis-master.redis.svc"
- - name: REDIS_HOST_PORT
- value: "6379"
- - name: PHP_UPLOAD_LIMIT
- value: "4096M"
- - name: PHP_MEMORY_LIMIT
- value: "2048M"
- - name: REDIS_HOST_PASSWORD
- valueFrom:
- secretKeyRef:
- name: redis
- key: root-password
- volumeMounts:
- - name: nextcloud
- mountPath: /var/www/html
- ports:
- - containerPort: 80
- name: http
- livenessProbe:
- initialDelaySeconds: 7200
- timeoutSeconds: 10
- httpGet:
- path: /index.php
- port: 80
- httpHeaders:
- - name: Host
- value: "ng.dodges.it"
- resources:
- requests:
- memory: "500Mi"
- cpu: "30m"
- volumes:
- - name: nextcloud
- persistentVolumeClaim:
- claimName: nextcloud
- ---
- apiVersion: batch/v1
- kind: CronJob
- metadata:
- name: nextcloud-backup
- spec:
- schedule: "@weekly"
- jobTemplate:
- spec:
- template:
- spec:
- affinity:
- nodeAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- nodeSelectorTerms:
- - matchExpressions:
- - key: arch
- operator: In
- values:
- - x86
- containers:
- - name: nextcloud-backup
- image: qdii/backup-rsync:latest
- env:
- - name: LOCAL_FOLDER_PATH
- value: /mnt/data/qdii/files
- - name: REMOTE_USER
- value: "uab10c1ba4bc"
- - name: REMOTE_SERVER
- value: "bck.dodges.it"
- - name: REMOTE_FOLDER_PATH
- value: "/home/uab10c1ba4bc/data/vol0/nextcloud"
- volumeMounts:
- - name: backup
- mountPath: "/root/.ssh/id_rsa"
- subPath: ssh_private_key
- readOnly: true
- - name: backup
- mountPath: "/root/.ssh/id_rsa.pub"
- subPath: ssh_public_key
- readOnly: true
- - name: nextcloud
- mountPath: /mnt
- restartPolicy: Never
- volumes:
- - name: backup
- secret:
- secretName: backup
- defaultMode: 0400
- - name: nextcloud
- persistentVolumeClaim:
- claimName: nextcloud
- ---
- apiVersion: batch/v1
- kind: CronJob
- metadata:
- name: nextcloud-backup-jb
- spec:
- schedule: "@weekly"
- jobTemplate:
- spec:
- template:
- spec:
- affinity:
- nodeAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- nodeSelectorTerms:
- - matchExpressions:
- - key: arch
- operator: In
- values:
- - x86
- containers:
- - name: nextcloud-backup-jb
- image: qdii/backup-rsync:latest
- env:
- - name: LOCAL_FOLDER_PATH
- value: /mnt/data/jb/files
- - name: REMOTE_USER
- value: "uab10c1ba4bc"
- - name: REMOTE_SERVER
- value: "bck.dodges.it"
- - name: REMOTE_FOLDER_PATH
- value: "/home/uab10c1ba4bc/data/vol0/jb"
- volumeMounts:
- - name: backup
- mountPath: "/root/.ssh/id_rsa"
- subPath: ssh_private_key
- readOnly: true
- - name: backup
- mountPath: "/root/.ssh/id_rsa.pub"
- subPath: ssh_public_key
- readOnly: true
- - name: nextcloud
- mountPath: /mnt
- restartPolicy: Never
- volumes:
- - name: backup
- secret:
- secretName: backup
- defaultMode: 0400
- - name: nextcloud
- persistentVolumeClaim:
- claimName: nextcloud
- ---
- apiVersion: batch/v1
- kind: CronJob
- metadata:
- name: nextcloud-backup-augustin
- spec:
- schedule: "@weekly"
- jobTemplate:
- spec:
- template:
- spec:
- affinity:
- nodeAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- nodeSelectorTerms:
- - matchExpressions:
- - key: arch
- operator: In
- values:
- - x86
- containers:
- - name: nextcloud-backup-augustin
- image: qdii/backup-rsync:latest
- env:
- - name: LOCAL_FOLDER_PATH
- value: /mnt/data/Augustin/files
- - name: REMOTE_USER
- value: "uab10c1ba4bc"
- - name: REMOTE_SERVER
- value: "bck.dodges.it"
- - name: REMOTE_FOLDER_PATH
- value: "/home/uab10c1ba4bc/data/vol0/augustin"
- volumeMounts:
- - name: backup
- mountPath: "/root/.ssh/id_rsa"
- subPath: ssh_private_key
- readOnly: true
- - name: backup
- mountPath: "/root/.ssh/id_rsa.pub"
- subPath: ssh_public_key
- readOnly: true
- - name: nextcloud
- mountPath: /mnt
- restartPolicy: Never
- volumes:
- - name: backup
- secret:
- secretName: backup
- defaultMode: 0400
- - name: nextcloud
- persistentVolumeClaim:
- claimName: nextcloud
|