migrate nextcloud from manifests to helm, upgrade to 38 and use postgres instead of mysql

This commit is contained in:
williamp committed 2026-11-11 20:23:49 -05:00
1 parent 71cafa4310
commit 9d6bd446bd
5 files changed
+172 -7

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
apiVersion: v2 apiVersion: v2
name: nextcloud-test name: nextcloud
description: A Helm chart for Kubernetes description: A Helm chart for Kubernetes
type: application type: application
+30
View File
@@ -0,0 +1,30 @@
{{- if .Values.externalSecret.admin.create }}
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: nextcloud-admin
spec:
data:
- remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: nextcloud
metadataPolicy: None
property: nextcloud-username
secretKey: nextcloud-username
- remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: nextcloud
metadataPolicy: None
property: nextcloud-password
secretKey: nextcloud-password
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
name: weyma-vault
target:
creationPolicy: Owner
deletionPolicy: Retain
name: nextcloud-admin
{{- end }}
@@ -0,0 +1,27 @@
{{- if .Values.dataVolume.create }}
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Values.dataVolume.name }}
spec:
capacity:
storage: 1Ti
accessModes: [ReadWriteMany]
persistentVolumeReclaimPolicy: Retain
storageClassName: ""
nfs:
server: 10.105.15.20
path: {{ .Values.dataVolume.nfsPath }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Values.dataVolume.name }}
spec:
accessModes: [ReadWriteMany]
storageClassName: ""
volumeName: {{ .Values.dataVolume.name }}
resources:
requests:
storage: 1Ti
{{- end }}
+27
View File
@@ -0,0 +1,27 @@
{{- if .Values.externalSecret.db.create }}
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: nextcloud-db
spec:
data:
- remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: cloudnativepg
metadataPolicy: None
property: {{ .Values.externalSecret.db.cnpgPropertyName }}
secretKey: password
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
name: weyma-vault
target:
template:
data:
username: {{ .Values.externalSecret.db.username }}
password: "{{`{{ .password }}`}}"
creationPolicy: Owner
deletionPolicy: Retain
name: nextcloud-db
{{- end }}
+87 -6
View File
@@ -1,18 +1,99 @@
dataVolume:
create: true
name: nextcloud-data
nfsPath: /mnt/hdd-pool/nextcloud-files
externalSecret:
db:
create: true
username: nextcloud
cnpgPropertyName: nextcloud_pw
admin:
create: true
nextcloud: nextcloud:
image: podAnnotations:
tag: 28.0.3-apache backup.velero.io/backup-volumes: nextcloud-main
replicaCount: 1
httpRoute: httpRoute:
enabled: true enabled: true
hostnames: hostnames:
- nextcloud-test.dubyatp.xyz - nextcloud.dubyatp.xyz
parentRefs: parentRefs:
- name: traefik - name: traefik
sectionName: https sectionName: https
kind: Gateway kind: Gateway
rules:
- matches:
- path:
type: PathPrefix
value: /
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: Strict-Transport-Security
value: "max-age=15552000; includeSubDomains"
nextcloud: nextcloud:
host: nextcloud-test.dubyatp.xyz host: nextcloud.dubyatp.xyz
existingSecret: existingSecret:
enabled: true enabled: true
secretName: nextcloud-secret secretName: nextcloud-admin
configs:
domains.config.php: |-
<?php
$CONFIG = array (
'trusted_domains' => array (
0 => 'localhost',
1 => 'nextcloud.dubyatp.xyz',
),
'overwrite.cli.url' => 'https://nextcloud.dubyatp.xyz',
'overwriteprotocol' => 'https',
'trusted_proxies' => array ('127.0.0.1', '10.0.0.0/8'),
'forwarded_for_headers' => array ('HTTP_X_FORWARDED_FOR'),
'default_phone_region' => 'US',
'maintenance_window_start' => 1,
);
db.config.php: |-
<?php
$CONFIG = array (
'dbtype' => 'pgsql',
'dbhost' => getenv('POSTGRES_HOST'),
'dbport' => '5432',
'dbname' => getenv('POSTGRES_DB'),
'dbuser' => getenv('POSTGRES_USER'),
'dbpassword' => getenv('POSTGRES_PASSWORD'),
);
internalDatabase: internalDatabase:
disabled: true enabled: false
externalDatabase:
enabled: true
type: postgresql
host: pooler-weyma-rw.cloudnativepg.svc.cluster.local
database: nextcloud
existingSecret:
enabled: true
secretName: nextcloud-db
usernameKey: username
passwordKey: password
redis:
enabled: true
architecture: standalone
auth:
enabled: false
master:
persistence:
enabled: false
commonConfiguration: |-
appendonly no
save ""
persistence:
enabled: true
nextcloudData:
enabled: true
existingClaim: nextcloud-data
accessMode: ReadWriteMany
cronjob:
enabled: true
type: sidecar
startupProbe:
enabled: true
failureThreshold: 90