Skip to content

Commit 0076aaa

Browse files
author
lijianguo
committed
chore(chart): add cronjob
1 parent 0eec7cd commit 0076aaa

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: batch/v1
2+
kind: CronJob
3+
metadata:
4+
name: drycc-helmbroker-cronjob-daily
5+
labels:
6+
heritage: drycc
7+
annotations:
8+
component.drycc.cc/version: {{ .Values.image_tag }}
9+
spec:
10+
schedule: "0 0 * * *"
11+
concurrencyPolicy: {{ .Values.concurrency_policy }}
12+
successfulJobsHistoryLimit: 1
13+
failedJobsHistoryLimit: 1
14+
jobTemplate:
15+
spec:
16+
template:
17+
spec:
18+
restartPolicy: OnFailure
19+
serviceAccount: drycc-helmbroker
20+
containers:
21+
- image: {{.Values.image_registry}}/{{.Values.image_org}}/helmbroker:{{.Values.image_tag}}
22+
imagePullPolicy: {{.Values.image_pull_policy}}
23+
name: drycc-helmbroker-cleaner
24+
command: ['python', '-m', 'helmbroker.cleaner']
25+
{{- include "helmbroker.envs" . | indent 12 }}
26+
{{- include "helmbroker.volumeMounts" . | indent 12 }}
27+
{{- include "helmbroker.volumes" . | indent 10 }}

charts/helmbroker/templates/helmbroker-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
- name: loader
2727
image: {{.Values.image_registry}}/{{.Values.image_org}}/helmbroker:{{.Values.image_tag}}
2828
imagePullPolicy: {{.Values.image_pull_policy}}
29-
command: ['python', '-m', 'helmbroker.loader'];
29+
command: ['python', '-m', 'helmbroker.loader']
3030
{{- include "helmbroker.envs" . | indent 10 }}
3131
{{- include "helmbroker.volumeMounts" . | indent 10 }}
3232
containers:

0 commit comments

Comments
 (0)