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. 

 

For one-shot-tree-substitution:  can we reframe the substitution problem as a layering problem?  If we:

  1. Define variables+values in regular CRDs/Kustomize resources (rather than standalone transformer files)
  2. Use normal Kustomize layering to override variable definitions an arbitrary number of times (e.g. function, composite, type levels)
  3. Wait till layering is fully rendered before doing variable substitution
  4. 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