From 14dd0bd8e87327fe141eca49a768c934a15a2cdf Mon Sep 17 00:00:00 2001 From: Geoffrey Ragot Date: Mon, 9 Dec 2024 09:31:26 +0100 Subject: [PATCH] feat: use a migration job for ledger 2.2 too... --- internal/resources/ledgers/deployments.go | 1 - internal/resources/ledgers/init.go | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/resources/ledgers/deployments.go b/internal/resources/ledgers/deployments.go index 24b6f747..3b456a9a 100644 --- a/internal/resources/ledgers/deployments.go +++ b/internal/resources/ledgers/deployments.go @@ -149,7 +149,6 @@ func installLedgerStateless(ctx core.Context, stack *v1beta1.Stack, } container.Env = append(container.Env, core.Env("BIND", ":8080"), - core.Env("AUTO_UPGRADE", "true"), ) experimentalFeatures, err := settings.GetBoolOrFalse(ctx, stack.Name, "ledger", "experimental-features") diff --git a/internal/resources/ledgers/init.go b/internal/resources/ledgers/init.go index 0f4d1d4c..567ccbe4 100644 --- a/internal/resources/ledgers/init.go +++ b/internal/resources/ledgers/init.go @@ -56,13 +56,9 @@ func Reconcile(ctx Context, stack *v1beta1.Stack, ledger *v1beta1.Ledger, versio } isV2 := false - isV2_2 := false if !semver.IsValid(version) || semver.Compare(version, "v2.0.0-alpha") > 0 { isV2 = true } - if !semver.IsValid(version) || semver.Compare(version, "v2.2.0-alpha") > 0 { - isV2_2 = true - } if err := benthosstreams.LoadFromFileSystem(ctx, benthos.Streams, ledger, "streams/ledger", "ingestion"); err != nil { return err @@ -96,7 +92,7 @@ func Reconcile(ctx Context, stack *v1beta1.Stack, ledger *v1beta1.Ledger, versio return NewPendingError().WithMessage("database not ready") } - if isV2 && !isV2_2 && databases.GetSavedModuleVersion(database) != version { + if isV2 && databases.GetSavedModuleVersion(database) != version { if err := migrate(ctx, stack, ledger, database, image, version); err != nil { return err }