Skip to content

Commit f7c725d

Browse files
authored
Merge pull request #7172 from sbueringer/pr-e2e-test-drop-cgroupfs
🌱 test/e2e: Drop support for Kubernetes < v1.24.0 in the RuntimeSDK upgrade test
2 parents 174f329 + 318dc0b commit f7c725d

File tree

7 files changed

+5
-52
lines changed

7 files changed

+5
-52
lines changed

test/e2e/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ cluster-templates-v1beta1: $(KUSTOMIZE) ## Generate cluster templates for v1beta
9696
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-upgrades --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-upgrades.yaml
9797
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-upgrades-cgroupfs --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-upgrades-cgroupfs.yaml
9898
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-upgrades-runtimesdk --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-upgrades-runtimesdk.yaml
99-
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-upgrades-runtimesdk-cgroupfs --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-upgrades-runtimesdk-cgroupfs.yaml
10099
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-kcp-scale-in --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-kcp-scale-in.yaml
101100
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-ipv6 --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-ipv6.yaml
102101
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1beta1/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1beta1/cluster-template-topology.yaml

test/e2e/cluster_upgrade_runtimesdk.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,8 @@ func clusterUpgradeWithRuntimeSDKSpec(ctx context.Context, inputGetter func() cl
282282
func extensionConfig(specName string, namespace *corev1.Namespace) *runtimev1.ExtensionConfig {
283283
return &runtimev1.ExtensionConfig{
284284
ObjectMeta: metav1.ObjectMeta{
285-
// FIXME(sbueringer): use constant name for now as we have to be able to reference it in the ClusterClass.
286-
// Random generate later on again when Yuvaraj's PR has split up the cluster lifecycle.
287-
//Name: fmt.Sprintf("%s-%s", specName, util.RandomString(6)),
285+
// Note: We have to use a constant name here as we have to be able to reference it in the ClusterClass
286+
// when configuring external patches.
288287
Name: specName,
289288
Annotations: map[string]string{
290289
runtimev1.InjectCAFromSecretAnnotation: fmt.Sprintf("%s/webhook-service-cert", namespace.Name),

test/e2e/cluster_upgrade_runtimesdk_test.go

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,10 @@ import (
2828

2929
var _ = Describe("When upgrading a workload cluster using ClusterClass with RuntimeSDK [PR-Informing] [ClusterClass]", func() {
3030
clusterUpgradeWithRuntimeSDKSpec(ctx, func() clusterUpgradeWithRuntimeSDKSpecInput {
31-
// "upgrades" is the same as the "topology" flavor but with an additional MachinePool.
32-
flavor := pointer.String("upgrades-runtimesdk")
33-
// For KubernetesVersionUpgradeFrom < v1.24 we have to use upgrades-cgroupfs flavor.
34-
// This is because kind and CAPD only support:
35-
// * cgroupDriver cgroupfs for Kubernetes < v1.24
36-
// * cgroupDriver systemd for Kubernetes >= v1.24.
37-
// Notes:
38-
// * We always use a ClusterClass-based cluster-template for the upgrade test
39-
// * The ClusterClass will automatically adjust the cgroupDriver for KCP and MDs.
40-
// * We have to handle the MachinePool ourselves
41-
// * The upgrades-cgroupfs flavor uses an MP which is pinned to cgroupfs
42-
// * During the upgrade UpgradeMachinePoolAndWait automatically drops the cgroupfs pinning
43-
// when the target version is >= v1.24.
44-
// TODO: We can remove this after the v1.25 release as we then only test the v1.24=>v1.25 upgrade.
4531
version, err := semver.ParseTolerant(e2eConfig.GetVariable(KubernetesVersionUpgradeFrom))
4632
Expect(err).ToNot(HaveOccurred(), "Invalid argument, KUBERNETES_VERSION_UPGRADE_FROM is not a valid version")
4733
if version.LT(semver.MustParse("1.24.0")) {
48-
// "upgrades-cgroupfs" is the same as the "topology" flavor but with an additional MachinePool
49-
// with pinned cgroupDriver to cgroupfs.
50-
flavor = pointer.String("upgrades-runtimesdk-cgroupfs")
34+
Fail("This test only supports upgrades from Kubernetes >= v1.24.0")
5135
}
5236

5337
return clusterUpgradeWithRuntimeSDKSpecInput{
@@ -56,7 +40,8 @@ var _ = Describe("When upgrading a workload cluster using ClusterClass with Runt
5640
BootstrapClusterProxy: bootstrapClusterProxy,
5741
ArtifactFolder: artifactFolder,
5842
SkipCleanup: skipCleanup,
59-
Flavor: flavor,
43+
// "upgrades" is the same as the "topology" flavor but with an additional MachinePool.
44+
Flavor: pointer.String("upgrades-runtimesdk"),
6045
}
6146
})
6247
})

test/e2e/config/docker.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ providers:
191191
- sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-upgrades.yaml"
192192
- sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-upgrades-cgroupfs.yaml"
193193
- sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-upgrades-runtimesdk.yaml"
194-
- sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-upgrades-runtimesdk-cgroupfs.yaml"
195194
- sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-kcp-scale-in.yaml"
196195
- sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-ipv6.yaml"
197196
- sourcePath: "../data/infrastructure-docker/v1beta1/cluster-template-topology.yaml"

test/e2e/data/infrastructure-docker/v1beta1/cluster-template-upgrades-runtimesdk-cgroupfs/kustomization.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/e2e/data/infrastructure-docker/v1beta1/cluster-template-upgrades-runtimesdk-cgroupfs/mp-cgroupfs.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/e2e/data/infrastructure-docker/v1beta1/cluster-template-upgrades-runtimesdk-cgroupfs/mp-default-cgroupfs.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)