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

helm release 6.0.1 can't use .tenant.configSecret #2255

Closed
JoKrefting opened this issue Aug 6, 2024 · 4 comments · Fixed by #2265
Closed

helm release 6.0.1 can't use .tenant.configSecret #2255

JoKrefting opened this issue Aug 6, 2024 · 4 comments · Fixed by #2265
Assignees

Comments

@JoKrefting
Copy link

Expected Behavior

Expectation is, that i can start using .tenant.configSecret on first deployment like in docs:

tenant:
  configSecret:
    name: myminio-env-configuration
    accessKey: minio 
    secretKey: minio123

Current Behavior

The current default value in values.yaml

secrets:
  name: myminio-env-configuration
  accessKey: minio 
  secretKey: minio123

Results into error:
Error: execution error at (tenant/templates/tenant-configuration.yaml:5:4): ERROR: '.secrets' and '.tenant.configSecret' are mutually exclusive. Please use 'tenant.configSecret' instead.

Possible Solution

Define secrets section to be empty like:

secrets: {}

Alternative could be adapting the logic within tenant/templates/tenant-configuration.yaml to use e.g. a priorization like:

  1. if .tenant.configSecret is defined -> create secret -> ignore possible .secret definition

Steps to Reproduce (for bugs)

  1. run helm template tenant minio/tenant --set tenant.configSecret.name="myminio-env-configuration" --set tenant.configSecret.accessKey="minio" --set tenant.configSecret.secretKey="minio123"

Context

Make use of new secret structure was the goal.

@jiuker
Copy link
Contributor

jiuker commented Aug 6, 2024

You should run it with --set secrets={} @JoKrefting

@JoKrefting
Copy link
Author

@jiuker overwriting defaults in this manner is not supported by helm at all. Once a default value is defined it is always present for dictionary at least.
So if i run:
helm template tenant minio/tenant --set tenant.configSecret.name="myminio-env-configuration" --set tenant.configSecret.accessKey="minio" --set tenant.configSecret.secretKey="minio123" --set secrets={}
I still get:
Error: execution error at (tenant/templates/tenant-configuration.yaml:5:4): ERROR: '.secrets' and '.tenant.configSecret' are mutually exclusive. Please use 'tenant.configSecret' instead.

One i use --set secrets=null it actually starts working. Found this here. So kinda resolved, even though i see a potential for improvement still in default setup ;)
Thx.

@rafaelromcar-parabol
Copy link

IMHO this is a bug. .secrets is marked as deprecated and .tenant.configSecret is supposed to be used, and yet .secrets has a value by default. There should not be any need to run it using --set secrets=null.

@stephan2012
Copy link

IMHO this is a bug. .secrets is marked as deprecated and .tenant.configSecret is supposed to be used, and yet .secrets has a value by default. There should not be any need to run it using --set secrets=null.

Workaround:

secrets: ~

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

Successfully merging a pull request may close this issue.

5 participants