From e9ae910aa477f653dfa49f3b3cac7f88fc89e0e8 Mon Sep 17 00:00:00 2001 From: Andrei Tserakhau Date: Tue, 12 Nov 2024 22:00:54 +0300 Subject: [PATCH] Use same deployement for snapshot and activate No description --- Co-authored-by: tserakhau Pull Request resolved: https://github.com/doublecloud/transfer/pull/99 commit_hash:e515c48b24b96bbfcf623aa0f27b54882c3d7ea4 --- cmd/trcli/main.go | 2 +- cmd/trcli/replicate/replicate.go | 2 +- helm/transfer/templates/deployment-type.yaml | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/trcli/main.go b/cmd/trcli/main.go index 63ff548f..689d73bd 100644 --- a/cmd/trcli/main.go +++ b/cmd/trcli/main.go @@ -72,7 +72,7 @@ func main() { } }() - switch logConfig { + switch strings.ToLower(logConfig) { case "json": loggerConfig = zp.NewProductionConfig() case "minimal": diff --git a/cmd/trcli/replicate/replicate.go b/cmd/trcli/replicate/replicate.go index d2ce2fa4..a907431d 100644 --- a/cmd/trcli/replicate/replicate.go +++ b/cmd/trcli/replicate/replicate.go @@ -34,7 +34,7 @@ func replicate(cp *coordinator.Coordinator, rt abstract.Runtime, transferYaml *s return xerrors.Errorf("unable to load transfer: %w", err) } transfer.Runtime = rt - if transfer.IncrementOnly() { + if !transfer.IncrementOnly() { if err := activate.RunActivate(*cp, transfer, registry, 0); err != nil { return xerrors.Errorf("unable to activate transfer: %w", err) } diff --git a/helm/transfer/templates/deployment-type.yaml b/helm/transfer/templates/deployment-type.yaml index e938c1e5..207b3bbe 100644 --- a/helm/transfer/templates/deployment-type.yaml +++ b/helm/transfer/templates/deployment-type.yaml @@ -13,8 +13,6 @@ {{- end }} {{- if eq .Values.transferSpec.type "SNAPSHOT_AND_INCREMENT" }} -{{ include "snapshot-job" . }} ---- {{ include "snapshot-regular-cronjob" . }} --- {{ include "replication-statefulset" . }}