mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-03 23:04:53 -04:00
AB#2255: Fix kubeadm version incompatibility (#293)
* Update image version * Introduce 'ValidK8sVersion' type. Ensures that consumers of the k8sVersion receive a valid version, without having to do their own validation. * Add testcase to check that kubeadm accepts the currently provided version.
This commit is contained in:
parent
ebf76ae7e3
commit
52ceced223
21 changed files with 146 additions and 92 deletions
|
@ -70,12 +70,8 @@ func NewKubernetesUtil() *KubernetesUtil {
|
|||
}
|
||||
|
||||
// InstallComponents installs kubernetes components in the version specified.
|
||||
func (k *KubernetesUtil) InstallComponents(ctx context.Context, version string) error {
|
||||
var versionConf versions.KubernetesVersion
|
||||
var ok bool
|
||||
if versionConf, ok = versions.VersionConfigs[version]; !ok {
|
||||
return fmt.Errorf("unsupported kubernetes version %q", version)
|
||||
}
|
||||
func (k *KubernetesUtil) InstallComponents(ctx context.Context, version versions.ValidK8sVersion) error {
|
||||
versionConf := versions.VersionConfigs[version]
|
||||
|
||||
if err := k.inst.Install(
|
||||
ctx, versionConf.CNIPluginsURL, []string{cniPluginsDir}, executablePerm, true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue