Open SamuraiPrinciple opened 8 months ago
Apologies, after receiving some feedback on issue https://github.com/google/jsonnet/issues/1147 I've realised that I've got it wrong way around - it's the go-jsonnet version that affected (which explains why argocd is affected too). Also, opened the issue in relevant project now - https://github.com/google/go-jsonnet/issues/749
ArgoCD versions 2.10 and below have reached EOL. Can you upgrade and tell us if the issue is still present, please?
Yes, this is still the case with the latest version (2.13.1) - this snippet:
{ apiVersion: 'v1', kind: 'ConfigMap', metadata: { name: 'repro', namespace: 'ingress-nginx-test' }, data: { key: std.manifestYamlDoc(std.parseYaml('a: bad---')), }, }
would emit:
apiVersion: v1 data: key: '- "a": "bad---"' kind: ConfigMap metadata: labels: argocd.argoproj.io/instance: cluster-bootstrap name: repro namespace: ingress-nginx-test
instead of:
apiVersion: v1 data: key: '"a": "bad---"' kind: ConfigMap metadata: labels: argocd.argoproj.io/instance: cluster-bootstrap name: repro namespace: ingress-nginx-test
Checklist:
argocd version
.Describe the bug
When using Jsonnet to generate manifests, std.parseYaml function returns incorrect result when string values contain
---
I've also filed an issue here:
https://github.com/google/jsonnet/issues/1147
Jsonnet go implementation (https://github.com/google/go-jsonnet) seems unaffected when I tested it locally (which is strange, because I believe that's the version argocd is using).
To Reproduce
Create an app with
test.jsonnet
file with the following content:Expected behavior
the
key
value should be{"a": "bad---"}
and not[{"a": "bad---"}]
Screenshots
Version
Logs
Not relevant