Skip to content

Commit

Permalink
use more thorough version from server
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Oct 17, 2023
1 parent d341b10 commit ba77bc8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package agent

import (
"fmt"
"strings"
"time"

"github.com/pluralsh/deployment-operator/pkg/client"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ba77bc8

Please sign in to comment.