versions: generate k8s image patches (incl etcd) (#2764)

* versions: generate k8s image patches (incl etcd)
This commit is contained in:
Markus Rudy 2023-12-21 20:56:55 +01:00 committed by GitHub
parent 8c1972c335
commit 837b24bf54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 288 additions and 130 deletions

View file

@ -52,13 +52,16 @@ func TestVersionFromDockerImage(t *testing.T) {
func TestKubernetesImagePatchCompatibility(t *testing.T) {
// This test ensures that pinned Kubernetes images correspond to the
// supported Kubernetes versions. It prevents automatic upgrades until
// a patch generator is added to the codebase.
// TODO(burgerdev): remove after patches are generated automatically.
// supported Kubernetes versions.
for v, clusterConfig := range VersionConfigs {
t.Run(string(v), func(t *testing.T) {
for i, component := range clusterConfig.KubernetesComponents.GetUpgradableComponents() {
if !strings.HasPrefix(component.Url, "data:") {
// This test only applies to kubeadm patches.
continue
}
if strings.Contains(component.InstallPath, "/etcd") {
// The etcd version is not derived from the Kubernetes version
continue
}
t.Run(fmt.Sprintf("%d-%s", i, path.Base(component.InstallPath)), func(t *testing.T) {