-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
ApplicationSet template is missing toYaml/fromYaml functions #11993
Comments
@alexbde I'm also surprised those functions aren't available. I'd welcome a PR to add them. Might event consider cherry-picking back to 2.5 if it's a pretty minimal PR. |
@crenshaw-dev Yeah, so was I, I would have actually expected it in the sprig library. I'm not a go developer at all, but I will try to have a look 👍 To whom it may concern: there are |
I saw that @alexbde put in an issue in Masterminds/sprig#358, which would be the ideal place to put it. Maybe as a workaround until then we could add those functions directly in |
There's now a PR in Masterminds/sprig#360 |
Wow! Thank you very much for taking care of that @blakepettersson ❤️ Fingers crossed the sprig maintainers will pick it up soon :) |
I don't see any movement from sprig. Let's do this in Argo CD now, and we can switch to the sprig implementation later if they add it. |
any update on this? |
I created the PR. I hope to merge as part of next release (2.9) |
We do have an use case which I would have thought is a pretty common one: we have an application Helm chart and multiple locations with application configurations. E.g., a git repository with general/common configurations (valid for all stages) & another git repository with stage-specific configurations.
Today we’re using the app-of-apps pattern with Helm charts to read & merge those configs/values.yaml files. Minimal example:
We tried to move to ApplicationSet instead of app-of-apps because it looks like the securer and more future-proof concept. We were very happy we can now use Go template with Argo CD >= 2.5 and the merging is working perfectly. Sadly, we noticed there is no toYaml/fromYaml function. We’re super close to the goal with the right result, but couldn’t simply print it.
Would it be possible to add this function to the upcoming 2.6 release? There is already a toJson function, which would at least make it work (because json is a subset of yaml). To make it beautiful and more native it would be great to have a toYaml/fromYaml function.
The text was updated successfully, but these errors were encountered: