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:
Otto Bittner 2022-07-21 14:41:07 +02:00 committed by GitHub
parent b57e9cf92a
commit 741384158a
22 changed files with 137 additions and 112 deletions

View file

@ -29,7 +29,7 @@ type ProviderMetadata interface {
// CloudControllerManager implementers provide configuration for the k8s cloud-controller-manager.
type CloudControllerManager interface {
// Image returns the container image used to provide cloud-controller-manager for the cloud-provider.
Image() string
Image(k8sVersion string) (string, error)
// Path returns the path used by cloud-controller-manager executable within the container image.
Path() string
// Name returns the cloud-provider name as used by k8s cloud-controller-manager (k8s.gcr.io/cloud-controller-manager).
@ -56,7 +56,7 @@ type CloudControllerManager interface {
// CloudNodeManager implementers provide configuration for the k8s cloud-node-manager.
type CloudNodeManager interface {
// Image returns the container image used to provide cloud-node-manager for the cloud-provider.
Image() string
Image(k8sVersion string) (string, error)
// Path returns the path used by cloud-node-manager executable within the container image.
Path() string
// ExtraArgs returns a list of arguments to append to the cloud-node-manager command.
@ -133,8 +133,8 @@ type stubCloudControllerManager struct {
SupportedResp bool
}
func (m *stubCloudControllerManager) Image() string {
return "stub-image:latest"
func (m *stubCloudControllerManager) Image(k8sVersion string) (string, error) {
return "stub-image:latest", nil
}
func (m *stubCloudControllerManager) Path() string {
@ -181,8 +181,8 @@ type stubCloudNodeManager struct {
ExtraArgsResp []string
}
func (m *stubCloudNodeManager) Image() string {
return m.ImageResp
func (m *stubCloudNodeManager) Image(k8sVersion string) (string, error) {
return m.ImageResp, nil
}
func (m *stubCloudNodeManager) Path() string {