k8s-land / gitea-chart

Gitea Helm Chart
https://charts.k8s.land
MIT License
31 stars 15 forks source link

mariadb persistance is not documented correcly #26

Open couillonnade opened 4 years ago

couillonnade commented 4 years ago

Hello,

there is a mistake in the documentation for MariaDB persistence. It states that you should set mariadb.persistence.enabled to true but it as actually mariadb.master.persistence.enabled (see sample below). Without it, it only create volumes with EmptyDir that does not survive if the pod is deleted or moved to another node.

Also if you want to support upgrades, you have to set both the db user password (mariadb.db.password) and root user (mariadb.rootUser.password). Again, without these, if you delete the deployment or pods, it won't restart properly.

I may have a look at the chart and propose an alternative in the sed command in init for the user password as well as check the rootpassword (force to use the secret if exists, there is a parameter in bitnami chart for that) if you are interested.

In the meantime, here is a working example of values:

mariadb:
    master:
      persistence:
        enabled: true
        storageClass: "yourstorageclass"
        accessMode: ReadWriteOnce
        size: 8Gi
    rootUser:
      password: "yourpass"
    db:
      enabled: true
      name: "gitea"
      user: "gitea"
      password: "yourpass"
cdrage commented 4 years ago

Hi @torpinouche thanks for pointing that out.

Do you mind opening up a PR to fix the documentation (within values.yaml and the README).

If not, I totally don't mind opening a PR. Just want to give you the opportunity if you wish!

couillonnade commented 4 years ago

@cdrage let me know if you are happy with the PR or if you want me to change anything!

Jasper-Ben commented 4 years ago

semi-related question: as far as I can tell, there currently is no way to provide the mariadb password via an existing kubernetes secret, right?

cdrage commented 4 years ago

Hey all, I have donated this chart to the folks over at Gitea who have been doing an amazing job maintaining and updating the chart so it is up to date. Please open up any issues here: https://gitea.com/gitea/helm-chart and try theirs own!

Many thanks for all who've contributed.