Skip to content

Commit

Permalink
EVEREST-1274: use git version for k8s version check (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Kralik authored Jul 26, 2024
1 parent debb64f commit d7d2208
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/common/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ func CheckK8sRequirements(supVer *SupportedVersion, l *zap.SugaredLogger, kubeCl
return errors.Join(err, errors.New("could not retrieve Kubernetes version"))
}

k8sVersion, err := goversion.NewVersion(fmt.Sprintf("%s.%s", k8sVersionInfo.Major, k8sVersionInfo.Minor))
k8sVersion, err := goversion.NewVersion(k8sVersionInfo.GitVersion)
if err != nil {
return errors.Join(err, errors.New("invalid Kubernetes version"))
return fmt.Errorf("invalid Kubernetes version %s: %w", k8sVersionInfo.GitVersion, err)
}

if !supVer.Kubernetes.Check(k8sVersion) {
Expand Down

0 comments on commit d7d2208

Please sign in to comment.