Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Upgrade to > 2.0.0 deleted PVC together with all data #366

Open
NotANormalNerd opened this issue Aug 22, 2024 · 7 comments
Open

[BUG] Upgrade to > 2.0.0 deleted PVC together with all data #366

NotANormalNerd opened this issue Aug 22, 2024 · 7 comments
Labels
bug Something isn't working pending answer

Comments

@NotANormalNerd
Copy link

Describe the bug
When upgrading the helm-chart from 1.x to 2.x my whole setup is being deleted including the PVC, which subsequently deletes all my data and e-mails.

Subsequently having a fresh install, I can't access the admin because of "Internal Server Error"

helm_v3 install --namespace mailu-v2 --version 2.1.1 mailu-v2 mailu-v2/mailu --values /config/values-01_HelmChart.yaml

Environment

  • K3s

Additional context

    mariadb:
      enabled: false
    postgresql:
      enabled: false
    domain: example.com
    hostnames:
    - mail.example.com
    admin:
      extraEnvVars:
      - name: LD_PRELOAD
        value: /usr/lib/libhardened_malloc.so
      - name: DEBUG
        value: "true"
    ingress:
      annotations:
        cert-manager.io/cluster-issuer: letsencrypt-production
        nginx.ingress.kubernetes.io/proxy-body-size: "0"
        traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd
      className: ""
      enabled: true
      realIpFrom: 0.0.0.0/0
      realIpHeader: X-Forwarded-For
    initialAccount:
      domain: example.com
      password: chang3m3!
      username: mailadmin
    persistence:
      accessMode: ReadWriteOnce
      single_pvc: true
      size: 11Gi
    postmaster: postmaster
    webmail:
      enabled: false
    secretKey: blablabla
    front:
      hostPort:
        enabled: false
      externalService:
        enabled: True
        type: LoadBalancer
        ports:
          pop3: false
          pop3s: true
          imap: false
          imaps: true
          smtp: true
          smtps: true
          submission: true
@NotANormalNerd NotANormalNerd added the bug Something isn't working label Aug 22, 2024
@dlford
Copy link

dlford commented Sep 7, 2024

@NotANormalNerd I had the same issue with admin access, here's how I fixed it (assuming you are using Traefik like me):

  1. Turn off the ingress in values.yaml (set enabled: false), it used to point to port 80 on mailu-front, but now points to port 443, which causes Traefik to throw an error 500 because the backend certificate is not valid for the domain [service].[namespace].svc.[cluster-domain]
  2. Create a servers transport for mailu-front (make sure your cluster domain is cluster.local or change it in serverName below to match).
    apiVersion: traefik.io/v1alpha1
    kind: ServersTransport
    metadata:
      name: mailu-web
    spec:
      serverName: mailu-front.[namespace].svc.cluster.local
      insecureSkipVerify: true # <-- This fixes the issue
  3. Create manually an ingress (and certificate if needed), but change the services to use the new servers transport.
    services:
      - name: mailu-front
        serversTransport: mailu-web
        port: 443

@WebSpider
Copy link
Contributor

The removal of the PVC is documented behaviour in https://github.com/Mailu/helm-charts/blob/master/mailu/MIGRATION_GUIDE.md

@NotANormalNerd
Copy link
Author

@WebSpider This migration guide applies for migrating to 1.0.0
grafik
If this also applies to 2.0.0 then at least the documentation should be updated.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Copy link
Contributor

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
@fastlorenzo fastlorenzo reopened this Dec 22, 2024
@fastlorenzo
Copy link
Collaborator

@NotANormalNerd thank you for reporting this, could you tell me exactly from which version you were upgrading and to which one?
How did you perform the upgrade?
This should not happen indeed but there were no changes to the pvc when using single_pvc since 1.0.0-beta.23.
d00d768

@NotANormalNerd
Copy link
Author

The last 1.5 version of the Chart to the 2.0 and even the 2.1 version of the Chart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending answer
Projects
None yet
Development

No branches or pull requests

4 participants