79 lines
2.5 KiB
YAML
79 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nextcloud
|
|
namespace: nextcloud
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: nextcloud
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nextcloud
|
|
spec:
|
|
# fsGroup sorgt dafür, dass gemountete Volumes die Gruppe www-data (33) bekommen
|
|
securityContext:
|
|
fsGroup: 33
|
|
# hostAliases mappt die öffentliche Domain intern auf die Service-ClusterIP,
|
|
# damit der Pod henryathome.home64.de direkt intern erreicht (vermeidet externe Loopback/Firewall/403)
|
|
hostAliases:
|
|
- ip: "10.43.107.87"
|
|
hostnames:
|
|
- "henryathome.home64.de"
|
|
containers:
|
|
- name: nextcloud
|
|
image: nextcloud:33-apache
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 80
|
|
env:
|
|
# - name: NEXTCLOUD_ADMIN_USER
|
|
# value: admin
|
|
# - name: NEXTCLOUD_ADMIN_PASSWORD
|
|
# value: admin
|
|
- name: MYSQL_HOST
|
|
value: mariadb.nextcloud.svc.cluster.local
|
|
- name: MYSQL_DATABASE
|
|
value: nextcloud
|
|
- name: MYSQL_USER
|
|
value: nextcloud
|
|
- name: MYSQL_PASSWORD
|
|
value: "nextcloud"
|
|
- name: REDIS_HOST
|
|
value: redis.nextcloud.svc.cluster.local
|
|
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
|
value: "henryathome.home64.de,192.168.178.0/24,192.168.178.138,nextcloud.nextcloud.svc.cluster.local"
|
|
- name: TRUSTED_PROXIES
|
|
value: "192.168.178.120"
|
|
- name: OVERWRITEHOST
|
|
value: "henryathome.home64.de"
|
|
- name: OVERWRITEPROTOCOL
|
|
value: "https"
|
|
- name: OVERWRITECLIURL
|
|
value: "https://henryathome.home64.de"
|
|
resources:
|
|
requests:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|
|
limits:
|
|
memory: "4Gi"
|
|
cpu: "3000m"
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /var/www/html/data
|
|
- name: config
|
|
mountPath: /var/www/html/config
|
|
- name: apps
|
|
mountPath: /var/www/html/custom_apps
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: nextcloud-data-pvc
|
|
- name: config
|
|
persistentVolumeClaim:
|
|
claimName: nextcloud-config-pvc
|
|
- name: apps
|
|
persistentVolumeClaim:
|
|
claimName: nextcloud-apps-pvc |