-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Jinja has a very useful feature: template inheritance. In hydration, child templates cannot share the same file name. For example, if you want to have a per-cluster kustomization.yaml.j2 child template, you couldn’t do this, because you can only have one file with this name.
When is this useful?
- you have a base file which should contain default behavior, but on a per group or per cluster basis selectively add extra content or behavior to a template
- a great example is adding resources to a kustomization.yaml file for a group or cluster based on its name, overriding only when necessary
- template inheritance makes the model very clean, but hydrator has no methods to allow for one cluster or group to override a file like kustomization because there can really only be one regular file or jinja template with the same name; filenames cannot collide
Consider allowing for per-item renames of jinja template files to a common name at hydration time
Metadata
Metadata
Assignees
Labels
No labels