1
0
Fork 0
home-stack-kustomize/kustomize/bases/nextcloud/nextcloud-deployment.yaml

99 lines
2.1 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:19.0.2
env:
- name: TRUSTED_PROXIES
value: 10.0.0.0/8
- name: POSTGRES_HOST
valueFrom:
secretKeyRef:
name: postgres-credentials-secret
key: host
- name: POSTGRES_DATABASE
valueFrom:
secretKeyRef:
name: postgres-credentials-secret
key: database
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgres-credentials-secret
key: username
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-credentials-secret
key: password
ports:
- name: http
containerPort: 80
volumeMounts:
- name: nextcloud-data
mountPath: /var/www/html
volumes:
- name: nextcloud-data
persistentVolumeClaim:
claimName: nextcloud-data
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nextcloud-data-nfs
labels:
app: nextcloud
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 100Mi
nfs:
server: nfs-localhost
path: /nextcloud
mountOptions: ["vers=4"]
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nextcloud-data
labels:
app: nextcloud
spec:
storageClassName: ""
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Mi
selector:
matchLabels:
app: nextcloud
---
apiVersion: v1
kind: Service
metadata:
name: nextcloud
labels:
app: nextcloud
spec:
selector:
app: nextcloud
ports:
- name: http
protocol: TCP
port: 80
targetPort: http