Pin kubernetes version deployed by kubeadm init

Signed-off-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
Malte Poll 2022-05-05 08:48:56 +02:00 committed by Malte Poll
parent 7614c53142
commit ddcb4dc95f
2 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package k8sapi
import (
"github.com/edgelesssys/constellation/coordinator/kubernetes/k8sapi/resources"
"github.com/edgelesssys/constellation/internal/constants"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kubeletconf "k8s.io/kubelet/config/v1beta1"
kubeadm "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3"
@ -44,6 +45,7 @@ func (c *CoreOSConfiguration) InitConfiguration(externalCloudProvider bool) Kube
Kind: "ClusterConfiguration",
APIVersion: kubeadm.SchemeGroupVersion.String(),
},
KubernetesVersion: constants.KubernetesVersion,
// necessary to be able to access the kubeapi server through localhost
APIServer: kubeadm.APIServer{
CertSANs: []string{"127.0.0.1", "10.118.0.1"},

View File

@ -39,6 +39,13 @@ const (
MinControllerCount = 1
MinWorkerCount = 1
//
// Kubernetes.
//
// KubernetesVersion installed by kubeadm.
KubernetesVersion = "stable-1.23"
)
// CliVersion is the version of the CLI. Left as a separate variable to allow override during build.