Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(upgrade): support force option #21

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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