add nextcloud

This commit is contained in:
TapTap committed 2026-10-20 16:03:32 +02:00
1 parent 7d123110a0
commit 0a126761a4
15 files changed
+212 -3

No files matched your search

+1
View File
@@ -21,6 +21,7 @@ spec:
- path: "cloudflare-ddns"
- path: "gitea"
- path: "homeassistant"
- path: "nextcloud"
template:
metadata:
name: "{{ index .path.segments 0 }}"
+3 -3
View File
@@ -3,12 +3,12 @@ kind: ExternalSecret
metadata:
name: gitlab-root-password
spec:
refreshPolicy: CreatedOnce
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
target:
name: gitlab-root-password
refreshPolicy: CreatedOnce
dataFrom:
- extract:
key: gitlab
- extract:
key: gitlab
+11
View File
@@ -0,0 +1,11 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: nextcloud-tls
spec:
secretName: nextcloud-tls-secret
dnsNames:
- nextcloud.tap-tap.win # IMPORTANT: Change this
issuerRef:
name: letsencrypt-issuer # This is the ClusterIssuer you created
kind: ClusterIssuer
+16
View File
@@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nextcloud-configmap
data:
MYSQL_PASSWORD: root
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
MYSQL_HOST: maria-db-nextcloud-service
NEXTCLOUD_ADMIN_USER: admin
PHP_MEMORY_LIMIT: 8192M
PHP_UPLOAD_LIMIT: 102400M
PHP_MAX_EXECUTION_TIME: "7200"
TRUSTED_PROXIES: 10.42.0.0/16
OVERWRITEPROTOCOL: https
OVERWRITECLIURL: http://nextcloud.tap-tap.win
+34
View File
@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextcloud-deployment
labels:
app: nextcloud
spec:
replicas: 1
selector:
matchLabels:
app: nextcloud
template:
metadata:
labels:
app: nextcloud
spec:
containers:
- name: nextcloud
image: nextcloud:34.0.3
# image: nextcloud:33.0.3
ports:
- containerPort: 80
envFrom:
- secretRef:
name: nextcloud-secret
- configMapRef:
name: nextcloud-configmap
volumeMounts:
- name: nextcloud-volume
mountPath: /var/www/html
volumes:
- name: nextcloud-volume
hostPath:
path: /root/kubernetes/nextcloud/data/mount/html
+14
View File
@@ -0,0 +1,14 @@
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: nextcloud-external-secret
spec:
refreshPolicy: CreatedOnce
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
target:
name: nextcloud-secret
dataFrom:
- extract:
key: nextcloud
+23
View File
@@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nextcloud-ingress
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-issuer"
spec:
ingressClassName: "traefik"
tls:
- hosts:
- nextcloud.tap-tap.win
secretName: nextcloud-tls-secret
rules:
- host: nextcloud.tap-tap.win
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nextcloud-service
port:
number: 80
+15
View File
@@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: nextcloud
resources:
- namespace.yaml
- external-secret.yaml
- config-map.yaml
- deployment.yaml
- service.yaml
- ingress.yaml
- maria-db-config-map.yaml
- maria-db-deployment.yaml
- maria-db-service.yaml
- redis-deployment.yaml
- redis-service.yaml
+9
View File
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: maria-db-nextcloud-configmap
data:
MYSQL_ROOT_PASSWORD: root
MYSQL_PASSWORD: root
MYSQL_DATABASE: nextcloud
MYSQL_USER: nextcloud
+31
View File
@@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: maria-db-nextcloud-deployment
labels:
app: maria-db-nextcloud
spec:
replicas: 1
selector:
matchLabels:
app: maria-db-nextcloud
template:
metadata:
labels:
app: maria-db-nextcloud
spec:
containers:
- name: maria-db-nextcloud
image: mariadb:11.4.4
envFrom:
- configMapRef:
name: maria-db-nextcloud-configmap
volumeMounts:
- name: maria-db-nextcloud-volume
mountPath: /var/lib/mysql
ports:
- containerPort: 3306
volumes:
- name: maria-db-nextcloud-volume
hostPath:
path: /root/kubernetes/nextcloud/data/mysql
+11
View File
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: maria-db-nextcloud-service
spec:
selector:
app: maria-db-nextcloud
ports:
- protocol: TCP
port: 3306
targetPort: 3306
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: nextcloud
+19
View File
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-deployment
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:7-alpine
ports:
- containerPort: 6379
+10
View File
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: redis-service
spec:
ports:
- port: 6379
targetPort: 6379
selector:
app: redis
+11
View File
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: nextcloud-service
spec:
selector:
app: nextcloud
ports:
- protocol: TCP
port: 80
targetPort: 80