From ba77bc842c85b7fa20ea26a3f975cd8277c78bd7 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Tue, 17 Oct 2023 14:42:03 -0400 Subject: [PATCH] use more thorough version from server --- pkg/agent/agent.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/agent/agent.go b/pkg/agent/agent.go index d6cd6f7b..f53d0bec 100644 --- a/pkg/agent/agent.go +++ b/pkg/agent/agent.go @@ -2,6 +2,7 @@ package agent import ( "fmt" + "strings" "time" "github.com/pluralsh/deployment-operator/pkg/client" @@ -92,8 +93,8 @@ func (agent *Agent) Run() { log.Error(err, "failed to fetch cluster version") return false, nil } - v := fmt.Sprintf("%s.%s", info.Major, info.Minor) - if err := agent.consoleClient.Ping(v); err != nil { + vs := strings.Split(info.GitVersion, "-") + if err := agent.consoleClient.Ping(vs[0]); err != nil { log.Error(err, "failed to ping cluster after scheduling syncs") } return false, nil