You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I can see the output of the template in my console log and the configmap.data values are not present. When performing a manual helm template --debug command, I can see these values in the output template as expected.
Output of the TerraTest helm unmarshal (I also added a print statement to just see what the value was as well)
logger.go:66: apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: sir-webapp
name: sir-webapp
data:
thisIsSomeDataKey: | // The values should be seen here
configmap_test.go:42: map[thisIsSomeDataKey:]
Output of a manual helm template command:
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: release-name
name: release-name
data:
thisIsSomeDataKey: |
configmap-data-value-1; // The values can be seen, as expected
configmap-data-value-2;
As I said, I think this might be an issue with the unmarshalling, as the ConfigMap.Data field is supposed to be a map[string]string, and using the "Literal Block Scalar" means that this is a bit confusing. Reading the documentation I linked to above, it seems like I should have 1 value, that spans multiple lines, so I would need to include newline characters, however, printing out the value of ConfigMap.Data["thisIsSomeDataKey"] shows that it has no value at all.
Versions
Terratest version: v0.43.13
Environment details: MacOS Ventura 13.5.1
Additional context
If this should be posted somewhere else as a Kubernetes bug, can you tell me where the best place would be please.
The text was updated successfully, but these errors were encountered:
I think this is probably a bug with Kubernetes go-client rather than TerraTest, but I think it's valuable to post it here for other users.
I have a configmap helm template that should produce an output that looks something like this:
You can see that I am using a "Literal Block Scalar" (search the term here to see more info) for my key
thisIsSomeDataKey
.I am rendering my template and then unmarshalling the result into
ConfigMap
object:But I can see the output of the template in my console log and the configmap.data values are not present. When performing a manual
helm template --debug
command, I can see these values in the output template as expected.Output of the TerraTest helm unmarshal (I also added a print statement to just see what the value was as well)
Output of a manual
helm template
command:As I said, I think this might be an issue with the unmarshalling, as the
ConfigMap.Data
field is supposed to be amap[string]string
, and using the "Literal Block Scalar" means that this is a bit confusing. Reading the documentation I linked to above, it seems like I should have 1 value, that spans multiple lines, so I would need to include newline characters, however, printing out the value ofConfigMap.Data["thisIsSomeDataKey"]
shows that it has no value at all.Versions
Additional context
If this should be posted somewhere else as a Kubernetes bug, can you tell me where the best place would be please.
The text was updated successfully, but these errors were encountered: