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

bugfix: upgrades not running #1939

Merged
merged 1 commit into from
Jan 12, 2024
Merged
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
10 changes: 9 additions & 1 deletion pkg/controller/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ const (
version430 = "v4.3.0"
version45 = "v4.5"
version500 = "v5.0.0"
// currentVersion will point to the latest released update version
currentVersion = version500
)

// Legacy const
Expand All @@ -62,7 +64,13 @@ func (c *Controller) checkForUpgrades(ctx context.Context, tenant *miniov2.Tenan
version500: c.upgrade500,
}

// if the version is not empty, this is not a new tenant, upgrade accordingly
// if tenant has no version we mark it with latest version upgrade released
if tenant.Status.SyncVersion == "" {
tenant.Status.SyncVersion = currentVersion
return c.updateTenantSyncVersion(ctx, tenant, version500)
}

// if the version is empty, upgrades might not been applied, we apply them all
if tenant.Status.SyncVersion != "" {
currentSyncVersion, err := version.NewVersion(tenant.Status.SyncVersion)
if err != nil {
Expand Down