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

138 lines
3.8 KiB
YAML
Raw Normal View History

2020-05-02 01:55:34 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: server
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:
# TODO: eviction policy
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 1
# preference:
# matchExpressions:
# # prefer being on an x64 node, for the extra oomf
# - key: kubernetes.io/arch
# operator: In
# values:
# - amd64
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
2021-12-28 03:47:52 +00:00
# prefer being on an x64 node, for the extra oomf
- key: kubernetes.io/arch
2021-12-28 03:47:52 +00:00
operator: In
values:
2021-12-28 03:47:52 +00:00
- 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
2023-06-10 22:15:39 +00:00
value: nextcloud-redis.$(NAMESPACE).svc
2021-08-28 03:54:21 +00:00
- name: REDIS_HOST_PASSWORD
valueFrom:
secretKeyRef:
name: redis-credentials
key: password
2021-08-26 16:42:10 +00:00
- name: POSTGRES_HOST
2023-06-10 22:15:39 +00:00
value: nextcloud-postgres.$(NAMESPACE).svc
2021-08-27 04:57:25 +00:00
- 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-06-17 04:47:01 +00:00
cpu: 1000m
2023-02-05 03:11:39 +00:00
memory: 2Gi
2021-08-27 04:57:25 +00:00
limits:
2023-06-17 04:47:01 +00:00
cpu: 2000m
2023-06-14 04:42:12 +00:00
memory: 2Gi
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
2023-06-12 17:29:18 +00:00
- name: server-config
2023-06-10 06:48:24 +00:00
mountPath: /usr/local/etc/php/conf.d/php-user.ini
subPath: php-user.ini
readOnly: true
2023-06-12 17:29:18 +00:00
- name: server-config
mountPath: /etc/apache2/conf-enabled/apache-user.conf
subPath: apache-user.conf
readOnly: true
2020-05-02 01:55:34 +00:00
volumes:
2021-08-27 04:57:25 +00:00
- name: nextcloud-pv
2020-05-02 01:55:34 +00:00
persistentVolumeClaim:
claimName: server-pvc
2023-06-12 17:29:18 +00:00
- name: server-config
2023-06-10 06:48:24 +00:00
configMap:
2023-06-12 17:29:18 +00:00
name: server-config
2020-05-02 01:55:34 +00:00
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: server-pvc
2023-06-17 02:29:18 +00:00
labels:
app.kubernetes.io/name: nextcloud
app.kubernetes.io/component: server
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:
2023-06-12 17:29:18 +00:00
storage: 100Gi
2020-05-02 01:55:34 +00:00
---
apiVersion: v1
kind: Service
metadata:
name: server
2020-05-02 01:55:34 +00:00
labels:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: nextcloud
2023-06-17 02:29:18 +00:00
app.kubernetes.io/component: server
2020-05-02 01:55:34 +00:00
spec:
selector:
2021-08-26 16:42:32 +00:00
app.kubernetes.io/name: nextcloud
2023-06-17 02:29:18 +00:00
app.kubernetes.io/component: server
2020-05-02 01:55:34 +00:00
ports:
- name: http
port: 80
2021-08-28 03:54:21 +00:00
targetPort: http