Code Monkey home page Code Monkey logo

Comments (5)

carrodher avatar carrodher commented on May 23, 2024

That's expected. Since the password from the first deployment is stored in the volume and volumes are not recreated during upgrades, you need to follow those instructions to use the already set password.

from charts.

MurzNN avatar MurzNN commented on May 23, 2024

But the correct working password is already stored in the secret, why do I need to specify it as a plaintext in the values.yaml again? Why the chart can't just get it from the secret directly?

This problem persists even if I specify the secret for passwords explicitly like:

auth:
  existingSecret: "db-credentials"

from charts.

juan131 avatar juan131 commented on May 23, 2024

Hi @MurzNN

We already have mechanisms in place to detect there's an existing secret and reuse its data thanks to the use of the common.secrets.passwords.manage helper, see:

You can reproduce it following these steps:

  • Install the chart setting a custom password for auth.rootPassword:
helm install mariadb oci://registry-1.docker.io/bitnamicharts/mariadb \
  --set auth.rootPassword=some-secret-password \
  --version 14.1.4 
  • Ensure the password has been properly set:
$ kubectl get secret mariadb -o jsonpath='{.data.mariadb-root-password}' | base64 --decode
some-secret-password
  • Upgrade the release without providing any password and double-check the secret data didn't change:
$ helm upgrade mariadb oci://registry-1.docker.io/bitnamicharts/mariadb --version 14.1.4
Pulled: registry-1.docker.io/bitnamicharts/mariadb:14.1.4
Digest: sha256:e8997dd398073d025d5ab076b89ca16e3f2eb08ad4c13d5ddd49ad795fc74c32
Release "mariadb" has been upgraded. Happy Helming!
NAME: mariadb
(...)
$ kubectl get secret mariadb -o jsonpath='{.data.mariadb-root-password}' | base64 --decode
some-secret-password

from charts.

github-actions avatar github-actions commented on May 23, 2024

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

from charts.

MurzNN avatar MurzNN commented on May 23, 2024

Yeah, all works well, sorry for bothering! The problem was that the secret file was created after the helm upgrade happened, because of this it was not detected and asked to specify the rootPassword.
After fixing the pipeline - all starts working well!

from charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.