-
Notifications
You must be signed in to change notification settings - Fork 360
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
set_list produces different behavior than array defined in values.yaml #1272
Comments
Hi @hauks96, This provider uses Helm ParseInto function to parse Have you tried to run P.S.: I have tried the following config and don't see any issues. resource "helm_release" "this" {
name = "this"
repository = "oci://registry-1.docker.io"
chart = "bitnamicharts/thanos"
namespace = "default"
timeout = 900
set_list {
name = "thanos.query.extraFlags"
value = []
}
set_list {
name = "thanos.query.stores"
value = []
}
} $ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
this default 1 2023-10-23 14:08:43.442646 +0200 CEST deployed thanos-12.13.12 0.32.5 Here is the chart I used to reproduce: https://artifacthub.io/packages/helm/bitnami/thanos |
Try it without the "thanos" path. I am using "thanos" in my path because I am using it as a subchart. Your assignment here will not have any effect because you are not setting the right attributes. resource "helm_release" "this" {
name = "this"
repository = "oci://registry-1.docker.io"
chart = "bitnamicharts/thanos"
namespace = "default"
timeout = 900
set_list {
name = "query.extraFlags"
value = []
}
set_list {
name = "query.stores"
value = []
}
} |
Hi @hauks96, Thank you for the correction. However, my answer remains the same. An empty list produces an empty line(this matches with Helm CLI) and the observed behavior is how chart developers handle this case. Thanks. |
My problem here is the fact that using a |
@arybolovlev Can you please re-add the bug label? This is clearly not intended behavior, given that it is not matching the behavior of vanilla helm values file. I've resorted to using the |
Terraform, Provider, Kubernetes and Helm Versions
Affected Resource(s)
Terraform Configuration Files
Relevant section displayed (two cases of set_list) with an empty array, which is also the default value within the chart itself, meaning it should have no effect
Values.yaml file
Debug Output
Here in the "Args" section we can see that there is a newline before the "State" section. This newline is preventing the container from starting, as it errors upon startup because of an invalid start command.
Now if I comment out the set_list fields from earlier, this newline is no longer present. Even though an empty array is also the default value in my values.yaml file.
Update:
If I go into edit mode using kubectl edit on the pod, there seems to be an additional array element added. Again, this does not happen when deploying using only values.yaml file with the same values, so the behavior in set_list is clearly not the same.
Expected Behavior
The set_list only creates lists and does not add anything that is not expected.
Actual Behavior
The set_list creates an unwanted newline where it is not expected.
Community Note
The text was updated successfully, but these errors were encountered: