Open maarten-blokker opened 8 months ago
There is another probably common occasion where this is a problem, namely where you use YAML anchors. The obvious example is with port numbers which must be integers. E.g.:
ports:
- name: api
containerPort: &containerPort 8080
envVars:
- name: BIND_PORT
value: *containerPort
Kubernetes will fail this manifest because containerPort must be an int and env var must be a string. The linked PR would allow this.
Hello, i've been using helmet for a little while and it makes creating a Helm chart quite a bit easier for me, thanks for creating this project!
In a recent task, I needed to define a chart with environment variables, including a port and a boolean value. Initially, Helmet used a list for envVars, which meant my custom envVars would override the predefined ones. However, with the update to version 0.11.0, Helmet now supports using a dictionary for envVars, allowing me to specify my variables in a values file without overriding the existing ones.
Unfortunately, I encountered a problem where the function fails to render environment variables as strings:
this renders the following output:
The
spec.template.spec.containers.env.value
should be a string, but the output incorrectly presents these values as a boolean and an integer (unquoted values).