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

113 lines
2.9 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
2021-12-27 00:11:38 +00:00
app.kubernetes.io/component: server
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
2021-12-27 00:11:38 +00:00
app.kubernetes.io/component: server
2020-05-02 01:55:34 +00:00
template:
metadata:
labels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: nextcloud
2021-12-27 00:11:38 +00:00
app.kubernetes.io/component: server
2020-05-02 01:55:34 +00:00
spec:
2021-08-28 03:54:21 +00:00
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
2021-12-28 03:47:52 +00:00
# prefer being on an x64 node, for the extra oomf
- key: kubernetes.io/arch
operator: In
values:
- amd64
2022-08-28 22:29:06 +00:00
tolerations:
- key: kubernetes.io/arch
operator: Equal
value: amd64
2020-05-02 01:55:34 +00:00
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-28 03:54:21 +00:00
- name: REDIS_HOST
value: redis.$(NAMESPACE).svc.cluster.local
- name: REDIS_HOST_PASSWORD
valueFrom:
secretKeyRef:
name: redis-credentials
key: password
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-28 03:54:21 +00:00
name: postgres-credentials
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-28 03:54:21 +00:00
name: postgres-credentials
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-28 03:54:21 +00:00
name: postgres-credentials
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:
2023-02-05 03:11:39 +00:00
cpu: 2000m
memory: 2Gi
2021-08-27 04:57:25 +00:00
limits:
2023-02-05 03:11:39 +00:00
cpu: 3000m
memory: 3Gi
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
2021-08-28 03:54:21 +00:00
targetPort: http