Skip to content

Commit

Permalink
Auto remove completed pods
Browse files Browse the repository at this point in the history
Signed-off-by: mi2428 <mi2428782020@gmail.com>
  • Loading branch information
mi2428 committed Jun 19, 2020
1 parent a77aa83 commit 2416a0f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions chart/linux-repository-mirror/templates/mirror-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
{{- include "linux-repository-mirror.labels" . | nindent 4 }}
spec:
schedule: "{{ .Values.mirror.archlinux.update.schedule }}"
failedJobsHistoryLimit: {{ .Values.mirror.archlinux.update.failedHistoryLimit }}
successfulJobsHistoryLimit: {{ .Values.mirror.archlinux.update.successfulHistoryLimit }}
concurrencyPolicy: Forbid
jobTemplate:
spec:
Expand Down Expand Up @@ -43,6 +45,8 @@ metadata:
{{- include "linux-repository-mirror.labels" . | nindent 4 }}
spec:
schedule: "{{ .Values.mirror.manjaro.update.schedule }}"
failedJobsHistoryLimit: {{ .Values.mirror.manjaro.update.failedHistoryLimit }}
successfulJobsHistoryLimit: {{ .Values.mirror.manjaro.update.successfulHistoryLimit }}
concurrencyPolicy: Forbid
jobTemplate:
spec:
Expand Down Expand Up @@ -80,6 +84,8 @@ metadata:
{{- include "linux-repository-mirror.labels" . | nindent 4 }}
spec:
schedule: "{{ .Values.mirror.ubuntu.update.schedule }}"
failedJobsHistoryLimit: {{ .Values.mirror.ubuntu.update.failedHistoryLimit }}
successfulJobsHistoryLimit: {{ .Values.mirror.ubuntu.update.successfulHistoryLimit }}
concurrencyPolicy: Forbid
jobTemplate:
spec:
Expand Down Expand Up @@ -111,6 +117,8 @@ metadata:
{{- include "linux-repository-mirror.labels" . | nindent 4 }}
spec:
schedule: "{{ .Values.mirror.debian.update.schedule }}"
failedJobsHistoryLimit: {{ .Values.mirror.debian.update.failedHistoryLimit }}
successfulJobsHistoryLimit: {{ .Values.mirror.debian.update.successfulHistoryLimit }}
concurrencyPolicy: Forbid
jobTemplate:
spec:
Expand Down Expand Up @@ -142,6 +150,8 @@ metadata:
{{- include "linux-repository-mirror.labels" . | nindent 4 }}
spec:
schedule: "{{ .Values.mirror.raspbian.update.schedule }}"
failedJobsHistoryLimit: {{ .Values.mirror.raspbian.update.failedHistoryLimit }}
successfulJobsHistoryLimit: {{ .Values.mirror.raspbian.update.successfulHistoryLimit }}
concurrencyPolicy: Forbid
jobTemplate:
spec:
Expand Down Expand Up @@ -173,6 +183,8 @@ metadata:
{{- include "linux-repository-mirror.labels" . | nindent 4 }}
spec:
schedule: "{{ .Values.mirror.gentoo.update.schedule }}"
failedJobsHistoryLimit: {{ .Values.mirror.gentoo.update.failedHistoryLimit }}
successfulJobsHistoryLimit: {{ .Values.mirror.gentoo.update.successfulHistoryLimit }}
concurrencyPolicy: Forbid
jobTemplate:
spec:
Expand Down
12 changes: 12 additions & 0 deletions chart/linux-repository-mirror/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ mirror:
update:
schedule: "*/20 * * * *"
activeDeadlineMinutes: 60
failedHistoryLimit: 1
successfulHistoryLimit: 2
pv:
name: archlinux-mirror-pv

Expand All @@ -35,6 +37,8 @@ mirror:
update:
schedule: "*/20 * * * *"
activeDeadlineMinutes: 60
failedHistoryLimit: 1
successfulHistoryLimit: 2
pv:
name: manjaro-mirror-pv

Expand All @@ -46,6 +50,8 @@ mirror:
update:
schedule: "*/20 * * * *"
activeDeadlineMinutes: 60
failedHistoryLimit: 1
successfulHistoryLimit: 2
pv:
name: ubuntu-mirror-pv

Expand All @@ -57,6 +63,8 @@ mirror:
update:
schedule: "*/20 * * * *"
activeDeadlineMinutes: 60
failedHistoryLimit: 1
successfulHistoryLimit: 2
pv:
name: debian-mirror-pv

Expand All @@ -68,6 +76,8 @@ mirror:
update:
schedule: "*/20 * * * *"
activeDeadlineMinutes: 60
failedHistoryLimit: 1
successfulHistoryLimit: 2
pv:
name: raspbian-mirror-pv

Expand All @@ -79,5 +89,7 @@ mirror:
update:
schedule: "0 0 * * *"
activeDeadlineMinutes: 60
failedHistoryLimit: 1
successfulHistoryLimit: 2
pv:
name: gentoo-mirror-pv

0 comments on commit 2416a0f

Please sign in to comment.