Skip to content

Commit

Permalink
feat(upgrade): support force option (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcRiiad authored Oct 1, 2024
1 parent bd8939e commit 5fa8456
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ Prints the actual installed version on the cluster
Prints true if an upgrade job should run, false if not.
*/}}
{{- define "stream.shouldRunUpgrade" }}
{{- if not .Release.IsUpgrade }}
{{- if .Values.upgrade.force }}
{{- print "true" }}
{{- else if not .Release.IsUpgrade }}
{{- print "false" }}
{{- else if not .Values.upgrade.enabled }}
{{- print "false" }}
Expand All @@ -72,4 +74,4 @@ Prints true if an upgrade job should run, false if not.
{{- print "false" }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ upgrade:
## @param upgrade.enabled If true, an upgrade job will be run when upgrading the release, modifying your database schema. This works even if `mongodb.enabled` is set to false.
##
enabled: true
## @param upgrade.enabled If true, an upgrade job will be run everytime the Chart is installed or upgraded.
##
force: false
## @param upgrade.image.registry Stream image registry
## @param upgrade.image.repository Stream image repository
## @param upgrade.image.tag Stream image tag (immutable tags are recommended)
Expand Down

0 comments on commit 5fa8456

Please sign in to comment.