2025-07-01 10:49:48 +10:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Namespace
|
|
|
|
metadata:
|
|
|
|
name: nextcloud
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolume
|
|
|
|
metadata:
|
|
|
|
name: nextcloud-pv
|
|
|
|
spec:
|
|
|
|
capacity:
|
|
|
|
storage: 10Gi
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
persistentVolumeReclaimPolicy: Retain
|
2025-07-02 00:00:07 +10:00
|
|
|
storageClassName: local-path
|
2025-07-01 10:49:48 +10:00
|
|
|
hostPath:
|
|
|
|
path: /dpool/temp/Nextcloud
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
|
|
|
name: nextcloud-pvc
|
|
|
|
namespace: nextcloud
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
2025-07-02 00:00:07 +10:00
|
|
|
storageClassName: local-path
|
2025-07-01 10:49:48 +10:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 10Gi
|
|
|
|
volumeName: nextcloud-pv
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: nextcloud
|
|
|
|
namespace: nextcloud
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
selector:
|
|
|
|
app: nextcloud
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: nextcloud
|
|
|
|
namespace: nextcloud
|
|
|
|
spec:
|
2025-07-02 00:30:14 +10:00
|
|
|
securityContext:
|
|
|
|
runAsUser: 1000
|
|
|
|
runAsGroup: 1000
|
|
|
|
fsGroup: 1000
|
2025-07-01 10:49:48 +10:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: nextcloud
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: nextcloud
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: nextcloud
|
|
|
|
image: nextcloud:29
|
|
|
|
env:
|
|
|
|
- name: MYSQL_PASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: nextcloud-secrets
|
|
|
|
key: MYSQL_PASSWORD
|
|
|
|
- name: MYSQL_DATABASE
|
|
|
|
value: nextcloud
|
|
|
|
- name: MYSQL_USER
|
|
|
|
value: nextcloud
|
|
|
|
- name: MYSQL_HOST
|
|
|
|
value: mariadb
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
volumeMounts:
|
|
|
|
- name: nextcloud-data
|
|
|
|
mountPath: /var/www/html
|
|
|
|
securityContext:
|
|
|
|
runAsUser: 1000
|
|
|
|
runAsGroup: 1000
|
|
|
|
fsGroup: 1000
|
|
|
|
volumes:
|
|
|
|
- name: nextcloud-data
|
|
|
|
persistentVolumeClaim:
|
2025-07-02 00:06:56 +10:00
|
|
|
claimName: nextcloud-pvc
|
2025-07-01 10:49:48 +10:00
|
|
|
---
|
2025-07-01 23:28:24 +10:00
|
|
|
apiVersion: k8s.mariadb.com/v1alpha1
|
2025-07-01 10:49:48 +10:00
|
|
|
kind: MariaDB
|
|
|
|
metadata:
|
|
|
|
name: nextcloud-db
|
|
|
|
namespace: nextcloud
|
|
|
|
spec:
|
|
|
|
rootPasswordSecretKeyRef:
|
|
|
|
name: nextcloud-secrets
|
2025-07-01 23:28:24 +10:00
|
|
|
key: MYSQL_ROOT_PASSWORD
|
|
|
|
database: nextcloud
|
2025-07-01 10:49:48 +10:00
|
|
|
username: nextcloud
|
|
|
|
passwordSecretKeyRef:
|
|
|
|
name: nextcloud-secrets
|
2025-07-01 23:28:24 +10:00
|
|
|
key: MYSQL_PASSWORD
|
2025-07-01 23:32:25 +10:00
|
|
|
image: mariadb:10.11
|
|
|
|
storage:
|
|
|
|
size: 5Gi
|
2025-07-01 10:49:48 +10:00
|
|
|
---
|
2025-07-03 14:15:02 +10:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: wildcard-hxme-net
|
|
|
|
namespace: nextcloud
|
|
|
|
annotations:
|
2025-07-03 14:42:59 +10:00
|
|
|
replicator.v1.mittwald.de/replicate-from: cert-manager/wildcard-hxme-net
|
2025-07-03 14:15:02 +10:00
|
|
|
---
|
2025-07-01 10:49:48 +10:00
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: nextcloud
|
|
|
|
namespace: nextcloud
|
|
|
|
annotations:
|
2025-07-01 23:01:12 +10:00
|
|
|
external-dns.alpha.kubernetes.io/hostname: nc.hxme.net
|
2025-07-01 10:49:48 +10:00
|
|
|
spec:
|
2025-07-03 13:51:10 +10:00
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- nc.hxme.net
|
|
|
|
secretName: wildcard-hxme-net
|
2025-07-01 10:49:48 +10:00
|
|
|
rules:
|
2025-07-01 23:01:12 +10:00
|
|
|
- host: nc.hxme.net
|
2025-07-01 10:49:48 +10:00
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
pathType: Prefix
|
|
|
|
backend:
|
|
|
|
service:
|
|
|
|
name: nextcloud
|
|
|
|
port:
|
|
|
|
number: 80
|
|
|
|
|