71 lines
2.1 KiB
YAML
71 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: cloud-deployment
|
|
namespace: nextcloud
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: cloud-pod
|
|
app.kubernetes.io/application: cloud
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: cloud-app
|
|
app.kubernetes.io/name: cloud-pod
|
|
app.kubernetes.io/application: cloud
|
|
redeploy: v3
|
|
spec:
|
|
containers:
|
|
- image: domaindrivenarchitecture/c4k-cloud:10.4.0
|
|
name: cloud-app
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 80
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- PGPASSWORD=$POSTGRES_PASSWORD psql -h postgresql-service -U $POSTGRES_USER $POSTGRES_DB
|
|
initialDelaySeconds: 1
|
|
periodSeconds: 5
|
|
env:
|
|
- name: NEXTCLOUD_ADMIN_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: cloud-secret
|
|
key: nextcloud-admin-user
|
|
- name: NEXTCLOUD_ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: cloud-secret
|
|
key: nextcloud-admin-password
|
|
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
|
value: fqdn
|
|
- name: POSTGRES_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-secret
|
|
key: postgres-user
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-secret
|
|
key: postgres-password
|
|
- name: POSTGRES_DB
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: postgres-config
|
|
key: postgres-db
|
|
- name: POSTGRES_HOST
|
|
value: "postgresql-service:5432"
|
|
volumeMounts:
|
|
- name: cloud-data-volume
|
|
mountPath: /var/www/html
|
|
volumes:
|
|
- name: cloud-data-volume
|
|
persistentVolumeClaim:
|
|
claimName: cloud-pvc
|