diff --git a/charts/netbox/templates/NOTES.txt b/charts/netbox/templates/NOTES.txt index cc3d1f30..242eb0a0 100644 --- a/charts/netbox/templates/NOTES.txt +++ b/charts/netbox/templates/NOTES.txt @@ -52,9 +52,3 @@ Get the application URL by running these commands: {{- include "common.warnings.rollingTag" .Values.image }} {{- include "common.warnings.rollingTag" .Values.init.image }} {{- include "common.warnings.resources" (dict "sections" (list "" "worker") "context" $) }} -{{- $passwordValidationErrors := list -}} -{{- if not .Values.superuser.existingSecret -}} - {{- $superuserPasswordValidationErrors := include "common.validations.values.single.empty" (dict "valueKey" "superuser.password" "secret" (include "common.secrets.name" (dict "defaultNameSuffix" "superuser" "context" .)) "field" "password" "context" $) -}} - {{- $passwordValidationErrors = append $passwordValidationErrors $superuserPasswordValidationErrors -}} -{{- end }} -{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $) -}} diff --git a/charts/netbox/templates/superuser-secrets.yaml b/charts/netbox/templates/superuser-secrets.yaml index 46474e1a..978c5277 100644 --- a/charts/netbox/templates/superuser-secrets.yaml +++ b/charts/netbox/templates/superuser-secrets.yaml @@ -11,7 +11,7 @@ metadata: type: kubernetes.io/basic-auth data: username: {{ .Values.superuser.name | default "admin" | b64enc | quote }} - password: {{ .Values.superuser.password | default (randAlphaNum 16) | b64enc | quote }} + password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.secrets.name" (dict "defaultNameSuffix" "superuser" "context" $)) "key" "password" "providedValues" (list "superuser.password") "context" $) }} email: {{ .Values.superuser.email | b64enc | quote }} api_token: {{ .Values.superuser.apiToken | default uuidv4 | b64enc | quote }} {{- end -}}