Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomize pass if value is empty. Override if secret is specified #141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scottrigby
Copy link

@scottrigby scottrigby commented Jan 25, 2024

fixes: #139

Notes to reviewers

This PR also deprecates adminPassword with a deprecation note in values.yaml and _helpers.tpl that it will be removed in a future version.

For now the PR changes that to:

admin:
  password: ""
  existingSecret: ""

Mainly because I felt adminPasswordExistingSecret would be a bit long. But can change that back if you prefer.

To-do:

Signed-off-by: Scott Rigby <scott@r6by.com>
@scottrigby scottrigby force-pushed the admin-password-secret-given-or-random branch from 55f3093 to 8bbf403 Compare January 25, 2024 03:54
Comment on lines +111 to +120
admin:
# If you leave this empty, and do not override with admin.existingSecret, a
# random password will be generated for you.
password: ""
# Specifying an existing secret name will override the admin.password.
# The secret key must be "admin-password"
# For example, to create from a file:
# echo -n 'S!B\*d$zDsb=' > ./admin-password.txt
# kubectl create secret generic admin-password-secret --from-file=admin-password.txt
existingSecret: ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can skip passing in a plaintext password, if you want to specify a password then you must create the secret before and set create: false

Suggested change
admin:
# If you leave this empty, and do not override with admin.existingSecret, a
# random password will be generated for you.
password: ""
# Specifying an existing secret name will override the admin.password.
# The secret key must be "admin-password"
# For example, to create from a file:
# echo -n 'S!B\*d$zDsb=' > ./admin-password.txt
# kubectl create secret generic admin-password-secret --from-file=admin-password.txt
existingSecret: ""
adminPassword:
secretKeyRef:
create: true # set to false if you want to pass in an existing secret
name: mission-control-admin-password
key: password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-generate admin password
2 participants