mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-25 23:06:08 -05:00
cli: fix supportedVersions during upgrade check
Previously the service version was always 0.0.0
This commit is contained in:
parent
13f1eb23d7
commit
3b3be85841
@ -319,10 +319,9 @@ type supportedVersionInfo struct {
|
|||||||
// supportedVersions returns slices of supported versions.
|
// supportedVersions returns slices of supported versions.
|
||||||
func (v *versionCollector) supportedVersions(ctx context.Context, version, currentK8sVersion string) (supportedVersionInfo, error) {
|
func (v *versionCollector) supportedVersions(ctx context.Context, version, currentK8sVersion string) (supportedVersionInfo, error) {
|
||||||
k8sVersions := versions.SupportedK8sVersions()
|
k8sVersions := versions.SupportedK8sVersions()
|
||||||
serviceVersion, err := helm.AvailableServiceVersions()
|
// Each CLI comes with a set of services that have the same version as the CLI.
|
||||||
if err != nil {
|
serviceVersion := compatibility.EnsurePrefixV(constants.VersionInfo())
|
||||||
return supportedVersionInfo{}, fmt.Errorf("loading service versions: %w", err)
|
|
||||||
}
|
|
||||||
imageVersions, err := v.newImages(ctx, version)
|
imageVersions, err := v.newImages(ctx, version)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return supportedVersionInfo{}, fmt.Errorf("loading image versions: %w", err)
|
return supportedVersionInfo{}, fmt.Errorf("loading image versions: %w", err)
|
||||||
|
@ -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.
|
// Load the embedded helm charts.
|
||||||
func (i *ChartLoader) Load(config *config.Config, conformanceMode bool, masterSecret, salt []byte) ([]byte, error) {
|
func (i *ChartLoader) Load(config *config.Config, conformanceMode bool, masterSecret, salt []byte) ([]byte, error) {
|
||||||
ciliumRelease, err := i.loadRelease(ciliumInfo)
|
ciliumRelease, err := i.loadRelease(ciliumInfo)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user