Skip to content

Commit

Permalink
[kong] remove deprecated runMigrations setting
Browse files Browse the repository at this point in the history
Removes the runMigrations setting from values.yaml. Migrations are now
controlled individually:

- migrations.init (runs "kong migrations bootstrap" on install)
- migrations.preUpgrade (runs "kong migrations up" during upgrades)
- migrations.postUpgrade (runs "kong migrations finish" during upgrades)

Fix #288
  • Loading branch information
Travis Raines committed Mar 1, 2021
1 parent 9305f4e commit 3adfc69
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
5 changes: 0 additions & 5 deletions charts/kong/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ Kong: https://bit.ly/k4k8s-get-started
{{- $warnings = append $warnings "You are currently using legacy admin API configuration in values.yaml. Support for this will be removed in a future release. Please see the upgrade guide for instructions to update your configuration: https://github.com/Kong/charts/blob/main/charts/kong/UPGRADE.md#changes-to-kong-service-configuration" -}}
{{- end -}}

{{- if .Values.runMigrations -}}
{{/* Legacy migration toggle */}}
{{- $warnings = append $warnings "You are currently using the legacy runMigrations setting in values.yaml. Support for this will be removed in a future release. Please see the upgrade guide for instructions to update your configuration: https://github.com/Kong/charts/blob/main/charts/kong/UPGRADE.md#changes-to-migration-job-configuration" -}}
{{- end -}}

{{ if (hasKey .Values "proxy.ingress.hosts") -}}
{{/* Legacy proxy ingress */}}
{{- $warnings = append $warnings "You are currently using legacy proxy Ingress configuration in values.yaml. Support for this will be removed in a future release. Please see the upgrade guide for instructions to update your configuration: https://github.com/Kong/charts/blob/main/charts/kong/UPGRADE.md#removal-of-multi-host-proxy-ingress" -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/kong/templates/migrations-post-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.deployment.kong.enabled }}
{{- if (and (or (.Values.runMigrations) (.Values.migrations.postUpgrade)) (not (eq .Values.env.database "off"))) }}
{{- if (and .Values.migrations.postUpgrade (not (eq .Values.env.database "off"))) }}
# Why is this Job duplicated and not using only helm hooks?
# See: https://github.com/helm/charts/pull/7362
apiVersion: batch/v1
Expand Down
2 changes: 1 addition & 1 deletion charts/kong/templates/migrations-pre-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.deployment.kong.enabled }}
{{- if (and (or (.Values.runMigrations) (.Values.migrations.preUpgrade)) (not (eq .Values.env.database "off"))) }}
{{- if (and .Values.migrations.preUpgrade (not (eq .Values.env.database "off"))) }}
# Why is this Job duplicated and not using only helm hooks?
# See: https://github.com/helm/charts/pull/7362
apiVersion: batch/v1
Expand Down
2 changes: 0 additions & 2 deletions charts/kong/templates/migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
{{- $runInit := true -}}
{{- if (hasKey .Values.migrations "init") -}}
{{- $runInit = .Values.migrations.init -}}
{{- else if (hasKey .Values "runMigrations") -}}
{{- $runInit = .Values.runMigrations -}}
{{- end -}}

{{- if (and ($runInit) (not (eq .Values.env.database "off"))) }}
Expand Down

0 comments on commit 3adfc69

Please sign in to comment.