diff --git a/templates/provider/hmc-templates/templates/templates.yaml b/templates/provider/hmc-templates/templates/templates.yaml index 84e11e1f7..3a1a3466a 100644 --- a/templates/provider/hmc-templates/templates/templates.yaml +++ b/templates/provider/hmc-templates/templates/templates.yaml @@ -1,4 +1,10 @@ {{ range $path, $_ := .Files.Glob "files/templates/*.yaml" }} +{{- $content := $.Files.Get $path | fromYaml }} +{{- $apiVersion := $content.apiVersion }} +{{- $kind := $content.kind }} +{{- $name := $content.metadata.name }} +{{- if not (lookup $apiVersion $kind $.Release.Namespace $name) }} {{ $.Files.Get $path }} --- -{{ end }} +{{- end }} +{{- end }}