mirror of
https://github.com/prowler-cloud/prowler.git
synced 2025-12-19 05:17:47 +00:00
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: {{ .Values.cronjob.name }}
|
|
namespace: {{ .Values.namespace.name }}
|
|
spec:
|
|
schedule: "{{ .Values.cronjob.schedule }}"
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: prowler
|
|
spec:
|
|
serviceAccountName: {{ .Values.serviceAccount.name }}
|
|
containers:
|
|
- name: prowler
|
|
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
|
args: ["kubernetes", "-z", "-b"]
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
volumeMounts:
|
|
{{- range $key, $value := .Values.configMap.data }}
|
|
{{- if and (eq $.Values.clusterType "gke") (eq $key "srvKubernetes") }}
|
|
{{- else }}
|
|
- name: {{ $key | lower }}
|
|
mountPath: {{ $value }}
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- end }}
|
|
hostPID: {{ .Values.cronjob.hostPID }}
|
|
restartPolicy: Never
|
|
volumes:
|
|
{{- range $key, $value := .Values.configMap.data }}
|
|
{{- if and (eq $.Values.clusterType "gke") (eq $key "srvKubernetes") }}
|
|
{{- else }}
|
|
- name: {{ $key | lower }}
|
|
hostPath:
|
|
path: {{ $value }}
|
|
{{- end }}
|
|
{{- end }}
|