From c681cfca433e385c45f6cf39735a2fda6ce427ec Mon Sep 17 00:00:00 2001 From: Tori Revilla Date: Thu, 19 Oct 2023 13:47:22 -0400 Subject: [PATCH] Fix operator upgrade --- .../orchestrator/installer/installer.go | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/operator/controllers/orchestrator/installer/installer.go b/operator/controllers/orchestrator/installer/installer.go index b43726b38..b64d08d37 100644 --- a/operator/controllers/orchestrator/installer/installer.go +++ b/operator/controllers/orchestrator/installer/installer.go @@ -1745,16 +1745,18 @@ func (i *Installer) GetACPVersion() string { return acpVersion } - acpVersionWithMetadata := versionResponse.ACPServer.Version - if acpVersionWithMetadata != "" { - versionInfo, err := versionutils.ParseDate(acpVersionWithMetadata) - if err != nil { - Log().WithField("acpVersion", acpVersionWithMetadata).Errorf("unable to parse ACP version") - acpVersion = acpVersionWithMetadata - } else { - acpVersion = versionInfo.ShortStringWithRelease() + if versionResponse.ACPServer != nil { + acpVersionWithMetadata := versionResponse.ACPServer.Version + if acpVersionWithMetadata != "" { + versionInfo, err := versionutils.ParseDate(acpVersionWithMetadata) + if err != nil { + Log().WithField("acpVersion", acpVersionWithMetadata).Errorf("unable to parse ACP version") + acpVersion = acpVersionWithMetadata + } else { + acpVersion = versionInfo.ShortStringWithRelease() + } + Log().WithField("acpVersion", acpVersion).Info("trident-acp is up.") } - Log().WithField("acpVersion", acpVersion).Info("trident-acp is up.") } return acpVersion