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

Wrong helm values processing in secret.yaml template #380

Open
a-b-v opened this issue Apr 27, 2023 · 0 comments
Open

Wrong helm values processing in secret.yaml template #380

a-b-v opened this issue Apr 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@a-b-v
Copy link

a-b-v commented Apr 27, 2023

Describe the bug

If I set a value like fluentd.extraEnv.elk_port to the port number, then I get an error about the wrong type for the value

Reproduction steps

  1. Set variables
    ELK_PORT=9200
    CHART_URL='https://github.com/vmware/kube-fluentd-operator/releases/download/v1.16.8/log-router-0.4.0.tgz'
  2. Run helm
    helm upgrade -i kfo ${CHART_URL} --set fluentd.extraEnv.elk_port="$ELK_PORT" --set reloader.extraEnv.elk_port="$ELK_PORT"
  3. Get an error
    Error: UPGRADE FAILED: template: log-router/templates/secret.yaml:21:34: executing "log-router/templates/secret.yaml" at : wrong type for value; expected string; got int64

Expected behavior

helm runs without an error

Additional context

I suggest modifying the secret.yaml template, by adding a "| toString" in lines 21 and 23:

fluentd.{{ $key }}: {{ $value | toString | b64enc | quote }}
reloader.{{ $key }}: {{ $value | toString | b64enc | quote }}

@a-b-v a-b-v added the bug Something isn't working label Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant