applicationset
applicationset copied to clipboard
Non-string template variables (alt: template overrides from git)
I have a bunch of applications loaded from git.
Sometimes we need to stop syncing per application.
It seems there is currently no way to achieve this? If I got it right:
- You cannot set
syncPolicy.automated.selfHeal
to'{{ autoSync }}'
asselfHeal
needs to be a boolean. Having only strings as variables is quite a heavy limitation- Another place where I have this issue is
valueFiles
for Helm, which are also app dependent, but this can be worked around by providing a single concatenated string as the list item
- Another place where I have this issue is
- You cannot load generated templates when using
git
generator?
Hi @dominykas,
Re: only strings as variable, let me check that out, agreed, let me check that out.
Re: loading generated templates, I am guessing you mean something like this: https://github.com/argoproj-labs/applicationset/issues/168#issue-840093112 (eg the ability to provide YAML/JSON within a Git file generator's configuration file, and have that substituted into the ApplicationSet template?)
have that substituted into the ApplicationSet template
Looking at the example from the thread, yes - it could work for the use cases I'm thinking of.
Thanks!
We are investigating using ApplicationSets to provision helm applications. Helm supports list templating and we use this to generate n amount of resources from a helm values list. Since ApplicationSets currently only supports strings we cannot use ApplicationSets to provision our applications.
Since json/yaml is used as the substitution configuration it makes sense to me that ApplicationSets should support the full typeset of json/yaml. Otherwise json/yaml does not make sense as a config file type.
The docs also currently do not make it clear that only strings (or nested objects, as long as eventually the value is a string) are supported so it is easy to make the mistake that since the config file is json, the assumption can be made that basic valid json would work (I would argue json lists are a pretty basic json feature).
@rouke-broersma Very well written as you say exactly my experience with this;
First being surprised that a json list didn't work and then trying to understand what kind of limitation the templating part has (documentation doesn't specify, and only have very basic examples).