fastlorenzo / helm-charts-1

Development repo for helm charts
2 stars 2 forks source link

[BUG] single pvc configuration skips integration mariadb persistent archive #33

Open HaleyACS opened 2 years ago

HaleyACS commented 2 years ago

Describe the bug When using a single PVC for persistent data in mailu-helm chart, the mariadb data directory should also be in under that directory.

Environment k3s on ubuntu server 22.04

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.8+k3s1", GitCommit:"5d0a12a6168bf2140216913ea9e5df6f81a26ec6", GitTreeState:"clean", BuildDate:"2021-06-21T20:44:53Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.8+k3s1", GitCommit:"5d0a12a6168bf2140216913ea9e5df6f81a26ec6", GitTreeState:"clean", BuildDate:"2021-06-21T20:44:53Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
version.BuildInfo{Version:"v3.10.2", GitCommit:"50f003e5ee8704ec937a756c646870227d7c8b58", GitTreeState:"clean", GoVersion:"go1.18.8"}

Additional context persistence configuration is:

persistence:
  single_pvc: true
  existingClaim: "mailu-storage"

The pvc definition used is:

---
apiVersion: v1
kind: PersistentVolume
metadata:
  namespace: mailu-mailserver
  name: "mailu-storage"
  labels:
    type: local
spec:
  storageClassName: "manual"
  claimRef:
    name: "mailu-storage"
    namespace: mailu-mailserver
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /data/mailu
status: {}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  namespace: mailu-mailserver
  name: "mailu-storage"
spec:
  volumeName: "mailu-storage"
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 100Gi
status: {}

The data storage for mariadb should show up under /data/mailu/mysql|mariadb|postgresql

fastlorenzo commented 2 years ago

Did you try to set the following values when deploying:

mariadb:
  persistence:
    enabled: true
    existingClaim: "mailu-storage"
    subPath: "mariadb"

From Bitnami chart configuration: (use under the mariadb key in your mailu values.yaml file) https://github.com/bitnami/charts/blob/e381d4b4ec846778711ebd305735165e5680ab4d/bitnami/mariadb/values.yaml#L432-L442

HaleyACS commented 2 years ago

Didn´t test it. will do so today.

HaleyACS commented 2 years ago

This causes the cluster deployment to hang, as the DB will be the first to grab the pv claim. So all pods not requiring disk access will come up + mariadb, but all others will hand.