For example, per the helm chart documentation for Drupal, the default value for accessModes
is ["ReadWriteOnce"]
which translates to the following in the YAML:
...
accessModes
- ReadWriteOnce
When using the Terraform helm_release resource, the following do not work and the yaml file always shows the default from above:
set {
name = "persistence.accessModes"
value = "ReadWriteMany"
}
set {
name = "persistence.accessModes"
value = "[\"ReadWriteMany\"]"
}
set {
name = "persistence.accessModes"
value = "- ReadWriteMany"
}
And how about annotations?
set {
name = "ingress.annotations[0]"
value = "cert-manager.io/cluster-issuer: letsencrypt-prod"
}
or
set {
name = "ingress.annotations[0].cert-manager.io/cluster-issuer"
value = "letsencrypt-prod"
}
The above does not work, nor does value = "cert-manager.io/cluster-issuer: letsencrypt-prod"
or value = "cert-manager\\.io\\/cluster-issuer: letsencrypt-prod"
they throw the following error:
Error: YAML parse error on drupal/templates/ingress.yaml: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal array into Go struct field .metadata.annotations of type map[string]string
What are the correct ways to set these types of values via the set{}
block in helm_release?