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

Ensure chart env values are strings/quoted #140

Merged
merged 2 commits into from
Feb 25, 2024

Conversation

rjinski
Copy link
Contributor

@rjinski rjinski commented Dec 4, 2023

Trying to use KEEP_SECRET_NAME the values were interpolated as boolean.

values.yaml

env:
  KEEP_SECRET_NAME: "true"

Or helm template . --set "env.KEEP_SECRET_NAME=true"

Or helm_release terraform provider

resource "helm_release" "postgres_controller" {
 ...
  set {
    name  = "env.KEEP_SECRET_NAME"
    type  = "string"
    value = "true"
  }
  ...
}

Desired:

containers:
  env:
    - name: KEEP_SECRET_NAME
      value: "true"

Actual:

containers:
  env:
    - name: KEEP_SECRET_NAME
      value: true
json: cannot unmarshal bool into Go struct field EnvVar.spec.template.spec.containers.env.value of type string

Environment values must always be of type string

@reddec
Copy link
Contributor

reddec commented Dec 12, 2023

@rjinski as workaround

env:
  KEEP_SECRET_NAME: "'true'"

@gcaracuel
Copy link

This is absolutely not hurtful but needed as the workaround is not that easy to find. It safe enough to be merged.

@hitman99
Copy link
Member

Nice work.

@hitman99 hitman99 merged commit 027cc24 into movetokube:master Feb 25, 2024
2 checks passed
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.

4 participants