Skip to content

Commit

Permalink
bugfix: upgrades not running (#1939)
Browse files Browse the repository at this point in the history
bugfix: upgrades no running

Signed-off-by: pjuarezd <[email protected]>
  • Loading branch information
pjuarezd authored Jan 12, 2024
1 parent 345f3cb commit fbef9f1
Showing 1 changed file with 9 additions and 1 deletion.
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

0 comments on commit fbef9f1

Please sign in to comment.