Skip to content

Commit

Permalink
Don't create template if it already exists
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Pavlov <[email protected]>
  • Loading branch information
Kshatrix committed Oct 1, 2024
1 parent 05edc46 commit 796e8eb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/provider/hmc-templates/templates/templates.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 796e8eb

Please sign in to comment.