With these named templates you can ensure the same metadata (resource name, namespace, labels, annotations) across all templates in your Helm chart. It is also can be used inside range loops.
Examples:
- In ingress.yaml there is an example of using
common.metadata
template without extra argument. - In vault-secrets.yaml there is a more complex example of using
common.metadata
, andresource.name
templates inside loop by passing$key
for generating VaultAuth and VaultStaticSecret for each key name in the values file.