76 lines
1.6 KiB
YAML
76 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nextcloud
|
|
labels:
|
|
app: nextcloud
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: nextcloud
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nextcloud
|
|
spec:
|
|
containers:
|
|
- name: nextcloud
|
|
image: nextcloud:18.0.4
|
|
env:
|
|
- name: TRUSTED_PROXIES
|
|
value: 10.0.0.0/8
|
|
- name: MYSQL_HOST
|
|
value: mariadb.nextcloud.svc:3306
|
|
- name: MYSQL_DATABASE
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mariadb-credentials-secret
|
|
key: database
|
|
- name: MYSQL_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mariadb-credentials-secret
|
|
key: username
|
|
- name: MYSQL_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mariadb-credentials-secret
|
|
key: password
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
volumeMounts:
|
|
- name: nextcloud-pvc
|
|
mountPath: /var/www/html
|
|
volumes:
|
|
- name: nextcloud-pvc
|
|
persistentVolumeClaim:
|
|
claimName: nextcloud-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: nextcloud-pvc
|
|
labels:
|
|
app: nextcloud
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 50Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: nextcloud
|
|
labels:
|
|
app: nextcloud
|
|
spec:
|
|
selector:
|
|
app: nextcloud
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 80
|
|
targetPort: http |