Skip to content

Commit

Permalink
fix: cron charts should be pre-install/upgrade hooks
Browse files Browse the repository at this point in the history
The templates need to be updated before the airflow-dag-trigger runs
  • Loading branch information
matthieu-foucault committed Jun 16, 2020
1 parent d3c6026 commit f178f9e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm/cas-ciip-portal/templates/airflow-dag-trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
annotations:
"helm.sh/hook": "pre-upgrade"
"helm.sh/hook-delete-policy": "before-hook-creation"
"helm.sh/hook-weight": "0"
{{- end }}
spec:
backoffLimit: 0
Expand Down
4 changes: 4 additions & 0 deletions helm/cas-ciip-portal/templates/cron-app-users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ template "cas-ciip-portal.fullname" . }}-app-user
labels:
{{ include "cas-ciip-portal.labels" . | indent 4 }}
annotations:
"helm.sh/hook": "pre-upgrade,pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
"helm.sh/hook-weight": "-5"
spec:
suspend: true # This cron job is intended to be triggered manually
schedule: "* * * * *"
Expand Down
4 changes: 4 additions & 0 deletions helm/cas-ciip-portal/templates/cron-deploy-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ template "cas-ciip-portal.fullname" . }}-schema-deploy-data
labels:
{{ include "cas-ciip-portal.labels" . | indent 4 }}
annotations:
"helm.sh/hook": "pre-upgrade,pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
"helm.sh/hook-weight": "-5"
spec:
suspend: true # This cron job is intended to be triggered manually
schedule: "* * * * *"
Expand Down
4 changes: 4 additions & 0 deletions helm/cas-ciip-portal/templates/cron-init-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ template "cas-ciip-portal.fullname" . }}-init-db
labels:
{{ include "cas-ciip-portal.labels" . | indent 4 }}
annotations:
"helm.sh/hook": "pre-upgrade,pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
"helm.sh/hook-weight": "-5"
spec:
suspend: true # This cron job is intended to be triggered manually
schedule: "* * * * *"
Expand Down
4 changes: 4 additions & 0 deletions helm/cas-ciip-portal/templates/cron-init-graphile-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ template "cas-ciip-portal.fullname" . }}-init-graphile-schema
labels:
{{ include "cas-ciip-portal.labels" . | indent 4 }}
annotations:
"helm.sh/hook": "pre-upgrade,pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
"helm.sh/hook-weight": "-5"
spec:
suspend: true # This cron job is intended to be triggered manually
schedule: "* * * * *"
Expand Down
4 changes: 4 additions & 0 deletions helm/cas-ciip-portal/templates/cron-swrs-import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ template "cas-ciip-portal.fullname" . }}-swrs-import
labels:
{{ include "cas-ciip-portal.labels" . | indent 4 }}
annotations:
"helm.sh/hook": "pre-upgrade,pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
"helm.sh/hook-weight": "-5"
spec:
suspend: true # This cron job is intended to be triggered manually
schedule: "* * * * *"
Expand Down

0 comments on commit f178f9e

Please sign in to comment.