Skip to content

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
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