mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-24 23:08:43 -04:00
AB#2076: version specific images (#288)
KubernetesVersion sent by the init command now controls all downloaded binaries, if they depend on the k8s version. * Move all download links into /internal/versions. * Unify files in /internal/versions package * Move image download links into VersionConfigs and thus make them dependant on the k8s version, where the image version is specific to the k8s version. * Don't specify patch version in k8sVersion
This commit is contained in:
parent
b57e9cf92a
commit
741384158a
22 changed files with 137 additions and 112 deletions
|
@ -3,11 +3,12 @@ package azure
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/edgelesssys/constellation/bootstrapper/cloudprovider"
|
||||
"github.com/edgelesssys/constellation/bootstrapper/internal/kubernetes/k8sapi/resources"
|
||||
"github.com/edgelesssys/constellation/internal/azureshared"
|
||||
"github.com/edgelesssys/constellation/internal/cloud/metadata"
|
||||
"github.com/edgelesssys/constellation/internal/versions"
|
||||
k8s "k8s.io/api/core/v1"
|
||||
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
@ -29,8 +30,11 @@ func NewCloudControllerManager(metadata ccmMetadata) *CloudControllerManager {
|
|||
}
|
||||
|
||||
// Image returns the container image used to provide cloud-controller-manager for the cloud-provider.
|
||||
func (c *CloudControllerManager) Image() string {
|
||||
return cloudprovider.CloudControllerManagerImageAzure
|
||||
func (c *CloudControllerManager) Image(k8sVersion string) (string, error) {
|
||||
if !versions.IsSupportedK8sVersion(k8sVersion) {
|
||||
return "", fmt.Errorf("received unsupported k8sVersion: %s", k8sVersion)
|
||||
}
|
||||
return versions.VersionConfigs[k8sVersion].CloudControllerManagerImageAzure, nil
|
||||
}
|
||||
|
||||
// Path returns the path used by cloud-controller-manager executable within the container image.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue