cli: fix supportedVersions during upgrade check

Previously the service version was always 0.0.0
This commit is contained in:
Otto Bittner 2023-05-16 15:21:15 +02:00
parent 13f1eb23d7
commit 3b3be85841
2 changed files with 3 additions and 14 deletions

View file

@ -319,10 +319,9 @@ type supportedVersionInfo struct {
// supportedVersions returns slices of supported versions.
func (v *versionCollector) supportedVersions(ctx context.Context, version, currentK8sVersion string) (supportedVersionInfo, error) {
k8sVersions := versions.SupportedK8sVersions()
serviceVersion, err := helm.AvailableServiceVersions()
if err != nil {
return supportedVersionInfo{}, fmt.Errorf("loading service versions: %w", err)
}
// Each CLI comes with a set of services that have the same version as the CLI.
serviceVersion := compatibility.EnsurePrefixV(constants.VersionInfo())
imageVersions, err := v.newImages(ctx, version)
if err != nil {
return supportedVersionInfo{}, fmt.Errorf("loading image versions: %w", err)