_______________________________________________Team, I wanted to continue the discussion around Kustomize-based variable substitution from Monday’s SIG-YAML design call.
There are two main Deckhand-like features we need out of Kustomize: Layering and Substitution.
- Layering is something Kustomize does really well, via strategic merge.
- Substitution is what's presenting some challenges, between custom plugins being unable to do late binding on variables (i.e., you only get one shot at a tree substitution using our VarReference plugin), and the fact that the Kustomize team is not really interested in enhancing variable capabilities overall.
For one-shot-tree-substitution: can we reframe the substitution problem as a layering problem? If we:
- Define variables+values in regular CRDs/Kustomize resources (rather than standalone transformer files)
- Use normal Kustomize layering to override variable definitions an arbitrary number of times (e.g. function, composite, type levels)
- Wait till layering is fully rendered before doing variable substitution
- Avoid deploying these variable catalog CRDs to the cluster, via e.g. via an “airshipit.org/no-deploy” label
Then I think we would be able to accomplish multiple overrides for YAML tree variables, and recursive variable references, at the same time.
#3 above then would require either a new plugin (Dmitry: does that sound possible?) or some kind of post-Kustomize step to fill in variables.
Am I missing anything?
Thanks,
Matt
Airship-discuss mailing list
Airship-discuss@lists.airshipit.org
http://lists.airshipit.org/cgi-bin/mailman/listinfo/airship-discuss