Skip to content

Commit

Permalink
Merge pull request #131 from shoplineapp/feature/PLAT-515-use-argo-bu…
Browse files Browse the repository at this point in the history
…ilt-in-pdb

feat(cronjob): use argo's built in support for pdb to replace custom chart
  • Loading branch information
thomaslishopline authored Oct 26, 2023
2 parents 49aee20 + b8544a5 commit f3b33a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
12 changes: 12 additions & 0 deletions cronjob/templates/_argo_cron_workflow.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@
{{- if .Values.exitNotifications }}
onExit: exit-handler
{{- end }}
{{- if .Values.pdb }}
{{- if eq .Values.pdb.enable true }}
podDisruptionBudget:
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- else }}
# Documentation: https://argoproj.github.io/argo-workflows/fields/#poddisruptionbudgetspec
# Provide arbitrary big number if you don't know how many pods workflow creates
minAvailable: {{ .Values.pdb.minAvailable | default 9999 }}
{{- end }}
{{- end }}
{{- end }}
templates:
- name: entry
steps:
Expand Down
17 changes: 0 additions & 17 deletions cronjob/templates/pdb.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions cronjob/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ serviceaccount: {}
suspend: false

pdb:
# If you just set "enable: true", default will set to "minAvailable: 100%" unless you have set other parameters.
# If you just set "enable: true", default will set to "minAvailable: 9999" unless you have set other parameters.
enable: false
# Note: You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget, and if you setting both will only set maxUnavailable.
# minAvailable: 50%
# maxUnavailable: 50%
# minAvailable: 9999
# maxUnavailable: 0

0 comments on commit f3b33a2

Please sign in to comment.