From 7cab2b08bc2a95956239478c4253504198a88319 Mon Sep 17 00:00:00 2001 From: Margash Date: Wed, 24 Apr 2024 13:17:16 +0200 Subject: [PATCH] fix: correctly read existing passwords from values (#374) Co-authored-by: Stefan Brand --- charts/nautobot/templates/_helpers.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/nautobot/templates/_helpers.tpl b/charts/nautobot/templates/_helpers.tpl index 5a8f3892..ee675a57 100644 --- a/charts/nautobot/templates/_helpers.tpl +++ b/charts/nautobot/templates/_helpers.tpl @@ -75,7 +75,7 @@ The secret key where the nautobot secret_key used by django will exist. Retrieve existing django/nautobot secret key, use one provided via values or generate a random one */}} {{- define "nautobot.django.secretKey" -}} - {{- include "common.secrets.passwords.manage" (dict "secret" (include "nautobot.django.secretName" .) "key" (include "nautobot.django.existingSecretSecretKeyKey" .) "providedValues" (list .Values.nautobot.django.secretKey .Values.nautobot.secretKey) "length" 64 "strong" true "context" $) -}} + {{- include "common.secrets.passwords.manage" (dict "secret" (include "nautobot.django.secretName" .) "key" (include "nautobot.django.existingSecretSecretKeyKey" .) "providedValues" (list "nautobot.django.secretKey" "nautobot.secretKey") "length" 64 "strong" true "context" $) -}} {{- end -}} {{- define "nautobot.superUser.secretName" -}} @@ -91,11 +91,11 @@ Retrieve existing django/nautobot secret key, use one provided via values or gen {{- end -}} {{- define "nautobot.superUser.apiToken" -}} - {{- include "common.secrets.passwords.manage" (dict "secret" (include "nautobot.superUser.secretName" . ) "key" (include "nautobot.superUser.existingSecretApiTokenKey" .) "providedValues" (list .Values.nautobot.superUser.apitoken) "length" 40 "strong" false "context" $) -}} + {{- include "common.secrets.passwords.manage" (dict "secret" (include "nautobot.superUser.secretName" . ) "key" (include "nautobot.superUser.existingSecretApiTokenKey" .) "providedValues" (list "nautobot.superUser.apitoken") "length" 40 "strong" false "context" $) -}} {{- end -}} {{- define "nautobot.superUser.password" -}} - {{- include "common.secrets.passwords.manage" (dict "secret" (include "nautobot.superUser.secretName" . ) "key" (include "nautobot.superUser.existingSecretPasswordKey" .) "providedValues" (list .Values.nautobot.superUser.password) "length" 64 "strong" true "context" $) -}} + {{- include "common.secrets.passwords.manage" (dict "secret" (include "nautobot.superUser.secretName" . ) "key" (include "nautobot.superUser.existingSecretPasswordKey" .) "providedValues" (list "nautobot.superUser.password") "length" 64 "strong" true "context" $) -}} {{- end -}} {{/*