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

87 lines
2.0 KiB
YAML
Raw Normal View History

2020-05-02 01:55:34 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
2020-05-18 20:18:39 +00:00
name: nextcloud
2020-05-02 01:55:34 +00:00
labels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: nextcloud
2020-05-02 01:55:34 +00:00
spec:
2021-08-27 04:57:25 +00:00
replicas: 1
strategy:
type: Recreate
2020-05-02 01:55:34 +00:00
selector:
matchLabels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: nextcloud
2020-05-02 01:55:34 +00:00
template:
metadata:
labels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: nextcloud
2020-05-02 01:55:34 +00:00
spec:
containers:
- name: nextcloud
2021-08-27 04:57:25 +00:00
image: nextcloud
2020-05-02 01:55:34 +00:00
env:
2021-08-27 04:57:25 +00:00
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
2020-05-02 01:55:34 +00:00
- name: TRUSTED_PROXIES
value: 10.0.0.0/8
2021-08-26 16:42:10 +00:00
- name: POSTGRES_HOST
2021-08-27 04:57:25 +00:00
value: postgres.$(NAMESPACE).svc.cluster.local
- name: POSTGRES_DB
2020-05-02 01:55:34 +00:00
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-05-02 01:55:34 +00:00
key: database
2021-08-26 16:42:10 +00:00
- name: POSTGRES_USER
2020-05-02 01:55:34 +00:00
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-05-02 01:55:34 +00:00
key: username
2021-08-26 16:42:10 +00:00
- name: POSTGRES_PASSWORD
2020-05-02 01:55:34 +00:00
valueFrom:
secretKeyRef:
2021-08-26 16:42:10 +00:00
name: postgres-credentials-secret
2020-05-02 01:55:34 +00:00
key: password
ports:
- name: http
containerPort: 80
2021-08-27 04:57:25 +00:00
resources:
requests:
cpu: 750m
memory: 75Mi
limits:
cpu: 1000m
memory: 1Gi
2020-05-02 01:55:34 +00:00
volumeMounts:
2021-08-27 04:57:25 +00:00
- name: nextcloud-pv
2020-05-02 01:55:34 +00:00
mountPath: /var/www/html
volumes:
2021-08-27 04:57:25 +00:00
- name: nextcloud-pv
2020-05-02 01:55:34 +00:00
persistentVolumeClaim:
2021-08-27 04:57:25 +00:00
claimName: nextcloud-pvc
2020-05-02 01:55:34 +00:00
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
2021-08-27 04:57:25 +00:00
name: nextcloud-pvc
2020-05-02 01:55:34 +00:00
spec:
accessModes:
2021-08-27 04:57:25 +00:00
- ReadWriteOnce
2020-05-02 01:55:34 +00:00
resources:
requests:
2021-08-27 04:57:25 +00:00
storage: 20Gi
2020-05-02 01:55:34 +00:00
---
apiVersion: v1
kind: Service
metadata:
name: nextcloud
labels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: nextcloud
2020-05-02 01:55:34 +00:00
spec:
selector:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: nextcloud
2020-05-02 01:55:34 +00:00
ports:
- name: http
port: 80
2020-08-02 03:40:27 +00:00
targetPort: http