Skip to content

Commit

Permalink
add gar logic to job
Browse files Browse the repository at this point in the history
  • Loading branch information
maratsal committed Sep 13, 2023
1 parent 4b9d492 commit 474345c
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion charts/registry-scanner/templates/job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
{{- if eq .Values.scanOnStart.enabled true }}
{{- if eq .Values.config.registryType "gar" }}
{{- range .Values.config.gar.regions }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ $.Values.scanOnStart.jobName }}-gar-{{ . }}"
labels:
{{ include "registry-scanner.labels" $ | indent 4 }}
{{- include "registry-scanner.customLabels" $ | nindent 4 }}
{{- if $.Values.scanOnStart.asPostInstallHook}}
annotations:
"helm.sh/hook": post-install
{{- end }}
spec:
{{- include "registry-scanner.jobTemplateGar" (list $ . ) | indent 2}}
{{- end }}
{{- else }}
---
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -12,4 +31,5 @@ metadata:
{{- end }}
spec:
{{- include "registry-scanner.jobTemplate" . | indent 2}}
{{- end}}
{{- end }}
{{- end }}

0 comments on commit 474345c

Please sign in to comment.