What is `templatePatch` in an ApplicationSet?
AdvancedConceptApplicationSets, App-of-Apps & Multi-Cluster
Answer
A Go-template string that renders to a patch applied on top of the generated Application, available with goTemplate: true. It enables conditional structure that the plain template cannot express, such as adding automated sync only for non-prod or adding extra value files when a parameter is set:
templatePatch: |
{{- if eq .env "dev" }}
spec:
syncPolicy:
automated: {prune: true, selfHeal: true}
{{- end }}
More on ApplicationSets, App-of-Apps & Multi-Cluster
What problem does an ApplicationSet solve?BeginnerList the ApplicationSet generators.BeginnerShow a list generator example.BeginnerHow does the cluster generator work?IntermediateCompare the git directory and git files generators.IntermediateWhat is a matrix generator and what are its limits?Intermediate