diff --git a/cli/internal/cmd/upgradecheck.go b/cli/internal/cmd/upgradecheck.go index a086f5522..60668637f 100644 --- a/cli/internal/cmd/upgradecheck.go +++ b/cli/internal/cmd/upgradecheck.go @@ -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) diff --git a/cli/internal/helm/loader.go b/cli/internal/helm/loader.go index 59b59ee9c..1e6cadbac 100644 --- a/cli/internal/helm/loader.go +++ b/cli/internal/helm/loader.go @@ -100,16 +100,6 @@ func NewLoader(csp cloudprovider.Provider, k8sVersion versions.ValidK8sVersion) } } -// AvailableServiceVersions returns the chart version number of the bundled service versions. -func AvailableServiceVersions() (string, error) { - servicesChart, err := loadChartsDir(helmFS, constellationServicesInfo.path) - if err != nil { - return "", fmt.Errorf("loading constellation-services chart: %w", err) - } - - return compatibility.EnsurePrefixV(servicesChart.Metadata.Version), nil -} - // Load the embedded helm charts. func (i *ChartLoader) Load(config *config.Config, conformanceMode bool, masterSecret, salt []byte) ([]byte, error) { ciliumRelease, err := i.loadRelease(ciliumInfo)