Closed MCDELTAT closed 1 month ago
I was able to get around this using a manually created secret. It took lots of fighting and looking between this chart and the postgresql chart. You'll want to create an opaque secret with the data fields of postgres-password
(admin user password) and password
(nautobot user password). The relevant sections to change are:
nautobot:
db:
engine: "django.db.backends.postgresql"
host: "postgres"
name: "nautobot"
user: "nautobot"
existingSecret: "nautobot-postgresql"
existingSecretPasswordKey: "password"
and
postgresql:
auth:
username: "nautobot"
database: "nautobot"
existingSecret: "nautobot-postgresql"
secretKeys:
adminPasswordKey: postgres-password
userPasswordKey: password
Hopefully this can still get fixed. I can stare at it a little longer. I guess I just want confirmation of what the expected behavior from the team is so I'm not changing it just to suit my needs.
Hello @MCDELTAT! If you put credentials under postgresql.auth
then nautobot will use those ones to connect to database, so there is no need to also add them under nautobot.db
. You need to add credentials under nautobot.db
if you connect to an external database.
Regarding the existing secrets, it's a solution to not store credentials inside values.yaml
, more info can be found here .
Hope this simplifies it a bit :)
Good point. I swore I had looked at the template for the secrets and it seemed unconditional for the Nautobot one. I see however that's not the case now, as seen here: https://github.com/nautobot/helm-charts/blob/v2.1.3/charts/nautobot/templates/secret.yaml#L23C5-L23C36
You can go ahead and close this, unless you think this could use better documentation in the values.yml. I can try to pick that up for you if you'd like.
Sure, I can leave it open for a while if you want to document it better. Help is always welcome 😉
What's Happening
I am installing a fresh instance of Nautobot via the 2.1.3 tagged release. When doing
helm install nautobot nautobot/nautobot -f nautobot-2.1.3-values.yaml
, I get the following error:Consequently, I get the following error in the events of the postgres pod
I did a dry run to get the full manifest output and confirmed that it is trying to create duplicate secrets.
helm install nautobot nautobot/nautobot -f nautobot-2.1.3-values.yaml --dry-run > nautobot-2.1.3_fullmanifest.yml
Within the full manifest output, I get the two duplicates. Line 96:
Line 149:
How to replicate
Use the following
values.yml
file in a manual installing with a command likehelm install nautobot nautobot/nautobot -f nautobot-2.1.3-values.yaml
(⚠️NOTE: Might need to change/remove ingress settings).