Skip to content

Commit

Permalink
Add e2e tests for 1.23 Bottlerocket
Browse files Browse the repository at this point in the history
  • Loading branch information
mitalipaygude committed Jun 3, 2022
1 parent 9a8e1b1 commit 7683e8a
Show file tree
Hide file tree
Showing 12 changed files with 160 additions and 80 deletions.
5 changes: 3 additions & 2 deletions cmd/integration_test/build/buildspecs/test-eks-a-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: 0.2

env:
variables:
INTEGRATION_TEST_MAX_EC2_COUNT: 120
INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT: 120
INTEGRATION_TEST_MAX_EC2_COUNT: 130
INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT: 130
T_CLOUDSTACK_CIDR: "10.11.101.0/16"
SKIPPED_TESTS: "TestVSphereKubernetes122BottlerocketAutoimport,TestTinkerbellKubernetes121ForceFlow,TestTinkerbellKubernetes121ThreeReplicasTwoWorkersForceFlow,TestTinkerbellKubernetes122ForceFlow,TestTinkerbellKubernetes120SimpleFlow,TestTinkerbellKubernetes121SimpleFlow,TestTinkerbellKubernetes121ThreeReplicasTwoWorkersSimpleFlow,TestTinkerbellKubernetes121DellSimpleFlow,TestTinkerbellKubernetes121HPSimpleFlow,TestTinkerbellKubernetes121SuperMicroSimpleFlow,TestTinkerbellKubernetes121ExternalEtcdSimpleFlow,TestTinkerbellKubernetes121ExternalEtcdThreeReplicasTwoWorkersSimpleFlow,TestCloudStackKubernetes120GitopsOptionsFluxLegacy,TestCloudStackKubernetes121RedhatAndRemoveWorkerNodeGroups,TestCloudStackUpgradeMulticlusterWorkloadClusterWithFluxLegacy,TestCloudStackKubernetes121StackedEtcdRedhat,TestCloudStackKubernetesUnstacked120RedhatTo121Upgrade,TestCloudStackKubernetes120StackedEtcdRedhat,TestCloudStackKubernetes120RedhatTo121Upgrade,TestCloudStackKubernetes120RedhatWorkerNodeUpgrade,TestCloudStackKubernetes121DifferentNamespaceSimpleFlow,TestCloudStackKubernetes120RedhatTo121MultipleFieldsUpgrade,TestCloudStackKubernetes120SimpleFlow,TestCloudStackKubernetes121RedhatProxyConfig,TestCloudStackKubernetes120OIDC,TestCloudStackKubernetes121OIDC,TestCloudStackKubernetes121RedhatRegistryMirrorAndCert,TestSnowKubernetes121SimpleFlow,TestSnowKubernetes121OIDC"
CLOUDSTACK_PROVIDER: true
Expand Down Expand Up @@ -35,6 +35,7 @@ env:
T_VSPHERE_TEMPLATE_BR_1_20: "vsphere_ci_beta_connection:template_br_20"
T_VSPHERE_TEMPLATE_BR_1_21: "vsphere_ci_beta_connection:template_br_21"
T_VSPHERE_TEMPLATE_BR_1_22: "vsphere_ci_beta_connection:template_br_22"
T_VSPHERE_TEMPLATE_BR_1_23: "vsphere_ci_beta_connection:template_br_23"
T_VSPHERE_TLS_INSECURE: "vsphere_ci_beta_connection:tls_insecure"
T_VSPHERE_TLS_THUMBPRINT: "vsphere_ci_beta_connection:tls_thumbprint"
EKSA_GITHUB_TOKEN: "github-eks-anywhere-flux-bot:github-token"
Expand Down
11 changes: 11 additions & 0 deletions test/e2e/awsiam_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,17 @@ func TestVSphereKubernetes122BottleRocketAWSIamAuth(t *testing.T) {
runAWSIamAuthFlow(test)
}

func TestVSphereKubernetes123BottleRocketAWSIamAuth(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewVSphere(t, framework.WithBottleRocket123()),
framework.WithAWSIam(),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
runAWSIamAuthFlow(test)
}

func TestVSphereKubernetes122To123AWSIamAuthUpgrade(t *testing.T) {
provider := framework.NewVSphere(t, framework.WithUbuntu122())
test := framework.NewClusterE2ETest(
Expand Down
29 changes: 20 additions & 9 deletions test/e2e/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,32 +121,43 @@ func TestVSphereKubernetes121BottleRocketThreeWorkersConformanceFlow(t *testing.
runConformanceFlow(test)
}

func TestCloudStackKubernetes120ThreeWorkersConformanceFlow(t *testing.T) {
func TestVSphereKubernetes122BottleRocketThreeWorkersConformanceFlow(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewCloudStack(t, framework.WithRedhat120()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube120)),
framework.NewVSphere(t, framework.WithBottleRocket122()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube122)),
framework.WithClusterFiller(api.WithWorkerNodeCount(3)),
)
runConformanceFlow(test)
}

func TestCloudStackKubernetes121ThreeWorkersConformanceFlow(t *testing.T) {
func TestVSphereKubernetes123BottleRocketThreeWorkersConformanceFlow(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewCloudStack(t, framework.WithCloudStackRedhat121()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube121)),
framework.NewVSphere(t, framework.WithBottleRocket123()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)),
framework.WithClusterFiller(api.WithWorkerNodeCount(3)),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
runConformanceFlow(test)
}

func TestVSphereKubernetes122BottleRocketThreeWorkersConformanceFlow(t *testing.T) {
func TestCloudStackKubernetes120ThreeWorkersConformanceFlow(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewVSphere(t, framework.WithBottleRocket122()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube122)),
framework.NewCloudStack(t, framework.WithRedhat120()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube120)),
framework.WithClusterFiller(api.WithWorkerNodeCount(3)),
)
runConformanceFlow(test)
}

func TestCloudStackKubernetes121ThreeWorkersConformanceFlow(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewCloudStack(t, framework.WithCloudStackRedhat121()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube121)),
framework.WithClusterFiller(api.WithWorkerNodeCount(3)),
)
runConformanceFlow(test)
}
14 changes: 8 additions & 6 deletions test/e2e/labels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,29 +95,31 @@ func TestVSphereKubernetes123Labels(t *testing.T) {
)
}

func TestVSphereKubernetes122LabelsBottlerocket(t *testing.T) {
provider := bottlerocket122ProviderWithLabels(t)
func TestVSphereKubernetes123LabelsBottlerocket(t *testing.T) {
provider := bottlerocket123ProviderWithLabels(t)

test := framework.NewClusterE2ETest(
t,
provider,
framework.WithClusterFiller(
api.WithKubernetesVersion(v1alpha1.Kube122),
api.WithKubernetesVersion(v1alpha1.Kube123),
api.WithExternalEtcdTopology(1),
api.WithControlPlaneCount(1),
api.RemoveAllWorkerNodeGroups(), // This gives us a blank slate
),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)

runLabelsUpgradeFlow(
test,
v1alpha1.Kube122,
v1alpha1.Kube123,
framework.WithClusterUpgrade(
api.WithWorkerNodeGroup(worker0, api.WithLabel(key1, val1)),
api.WithWorkerNodeGroup(worker1, api.WithLabel(key2, val2)),
api.WithWorkerNodeGroup(worker2),
api.WithControlPlaneLabel(cpKey1, cpVal1),
),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
}

Expand All @@ -141,7 +143,7 @@ func ubuntu123ProviderWithLabels(t *testing.T) *framework.VSphere {
)
}

func bottlerocket122ProviderWithLabels(t *testing.T) *framework.VSphere {
func bottlerocket123ProviderWithLabels(t *testing.T) *framework.VSphere {
return framework.NewVSphere(t,
framework.WithVSphereWorkerNodeGroup(
worker0,
Expand All @@ -157,6 +159,6 @@ func bottlerocket122ProviderWithLabels(t *testing.T) *framework.VSphere {
framework.WithWorkerNodeGroup(worker2, api.WithCount(1),
api.WithLabel(key2, val2)),
),
framework.WithBottleRocket122(),
framework.WithBottleRocket123(),
)
}
11 changes: 7 additions & 4 deletions test/e2e/multiple_worker_node_groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (

"github.com/aws/eks-anywhere/internal/pkg/api"
anywherev1 "github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/features"
"github.com/aws/eks-anywhere/test/framework"
)

func TestVSphereKubernetes122BottlerocketAndAndRemoveWorkerNodeGroups(t *testing.T) {
func TestVSphereKubernetes123BottlerocketAndAndRemoveWorkerNodeGroups(t *testing.T) {
provider := framework.NewVSphere(t,
framework.WithVSphereWorkerNodeGroup(
"worker-1",
Expand All @@ -21,22 +22,23 @@ func TestVSphereKubernetes122BottlerocketAndAndRemoveWorkerNodeGroups(t *testing
"worker-1",
framework.WithWorkerNodeGroup("workers-2", api.WithCount(1)),
),
framework.WithBottleRocket122(),
framework.WithBottleRocket123(),
)
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithClusterFiller(
api.WithKubernetesVersion(anywherev1.Kube122),
api.WithKubernetesVersion(anywherev1.Kube123),
api.WithExternalEtcdTopology(1),
api.WithControlPlaneCount(1),
api.RemoveAllWorkerNodeGroups(), // This gives us a blank slate
),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)

runSimpleUpgradeFlow(
test,
anywherev1.Kube122,
anywherev1.Kube123,
framework.WithClusterUpgrade(
api.RemoveWorkerNodeGroup("workers-2"),
api.WithWorkerNodeGroup("workers-1", api.WithCount(1)),
Expand All @@ -48,6 +50,7 @@ func TestVSphereKubernetes122BottlerocketAndAndRemoveWorkerNodeGroups(t *testing
api.WithCount(1),
),
),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
}

Expand Down
7 changes: 4 additions & 3 deletions test/e2e/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ func TestVSphereKubernetes123UbuntuProxyConfig(t *testing.T) {
runProxyConfigFlow(test)
}

func TestVSphereKubernetes122BottlerocketProxyConfig(t *testing.T) {
func TestVSphereKubernetes123BottlerocketProxyConfig(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewVSphere(t, framework.WithBottleRocket122(),
framework.NewVSphere(t, framework.WithBottleRocket123(),
framework.WithPrivateNetwork()),
framework.WithClusterFiller(api.WithExternalEtcdTopology(1)),
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithWorkerNodeCount(1)),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube122)),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)),
framework.WithProxy(),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
runProxyConfigFlow(test)
}
Expand Down
7 changes: 4 additions & 3 deletions test/e2e/registry_mirror_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ func TestVSphereKubernetes123UbuntuRegistryMirrorAndCert(t *testing.T) {
runRegistryMirrorConfigFlow(test)
}

func TestVSphereKubernetes122BottlerocketRegistryMirrorAndCert(t *testing.T) {
func TestVSphereKubernetes123BottlerocketRegistryMirrorAndCert(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewVSphere(t, framework.WithBottleRocket122(), framework.WithPrivateNetwork()),
framework.NewVSphere(t, framework.WithBottleRocket123(), framework.WithPrivateNetwork()),
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithWorkerNodeCount(1)),
framework.WithClusterFiller(api.WithExternalEtcdTopology(1)),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube122)),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)),
framework.WithRegistryMirrorEndpointAndCert(),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
runRegistryMirrorConfigFlow(test)
}
Expand Down
21 changes: 12 additions & 9 deletions test/e2e/simpleflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,32 +138,35 @@ func TestVSphereKubernetes122DifferentNamespaceSimpleFlow(t *testing.T) {
runSimpleFlow(test)
}

func TestVSphereKubernetes122BottleRocketSimpleFlow(t *testing.T) {
func TestVSphereKubernetes123BottleRocketSimpleFlow(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewVSphere(t, framework.WithBottleRocket122()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube122)),
framework.NewVSphere(t, framework.WithBottleRocket123()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
runSimpleFlow(test)
}

func TestVSphereKubernetes122BottleRocketThreeReplicasFiveWorkersSimpleFlow(t *testing.T) {
func TestVSphereKubernetes123BottleRocketThreeReplicasFiveWorkersSimpleFlow(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewVSphere(t, framework.WithBottleRocket122()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube122)),
framework.NewVSphere(t, framework.WithBottleRocket123()),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)),
framework.WithClusterFiller(api.WithControlPlaneCount(3)),
framework.WithClusterFiller(api.WithWorkerNodeCount(5)),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
runSimpleFlow(test)
}

func TestVSphereKubernetes122BottleRocketDifferentNamespaceSimpleFlow(t *testing.T) {
func TestVSphereKubernetes123BottleRocketDifferentNamespaceSimpleFlow(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
framework.NewVSphere(t, framework.WithBottleRocket122(), framework.WithVSphereFillers(api.WithVSphereConfigNamespaceForAllMachinesAndDatacenter(clusterNamespace))),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube122)),
framework.NewVSphere(t, framework.WithBottleRocket123(), framework.WithVSphereFillers(api.WithVSphereConfigNamespaceForAllMachinesAndDatacenter(clusterNamespace))),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube123)),
framework.WithClusterFiller(api.WithClusterNamespace(clusterNamespace)),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
runSimpleFlow(test)
}
Expand Down
14 changes: 8 additions & 6 deletions test/e2e/taints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,29 +91,31 @@ func TestVSphereKubernetes123Taints(t *testing.T) {
)
}

func TestVSphereKubernetes122TaintsBottlerocket(t *testing.T) {
provider := bottlerocket122ProviderWithTaints(t)
func TestVSphereKubernetes123TaintsBottlerocket(t *testing.T) {
provider := bottlerocket123ProviderWithTaints(t)

test := framework.NewClusterE2ETest(
t,
provider,
framework.WithClusterFiller(
api.WithKubernetesVersion(v1alpha1.Kube122),
api.WithKubernetesVersion(v1alpha1.Kube123),
api.WithExternalEtcdTopology(1),
api.WithControlPlaneCount(1),
api.RemoveAllWorkerNodeGroups(), // This gives us a blank slate
),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)

runTaintsUpgradeFlow(
test,
v1alpha1.Kube122,
v1alpha1.Kube123,
framework.WithClusterUpgrade(
api.WithWorkerNodeGroup(worker0, api.WithTaint(framework.NoExecuteTaint())),
api.WithWorkerNodeGroup(worker1, api.WithTaint(framework.NoExecuteTaint())),
api.WithWorkerNodeGroup(worker2, api.WithNoTaints()),
api.WithControlPlaneTaints([]corev1.Taint{framework.PreferNoScheduleTaint()}),
),
framework.WithEnvVar(features.K8s123SupportEnvVar, "true"),
)
}

Expand All @@ -135,7 +137,7 @@ func ubuntu123ProviderWithTaints(t *testing.T) *framework.VSphere {
)
}

func bottlerocket122ProviderWithTaints(t *testing.T) *framework.VSphere {
func bottlerocket123ProviderWithTaints(t *testing.T) *framework.VSphere {
return framework.NewVSphere(t,
framework.WithVSphereWorkerNodeGroup(
worker0,
Expand All @@ -149,6 +151,6 @@ func bottlerocket122ProviderWithTaints(t *testing.T) *framework.VSphere {
worker2,
framework.PreferNoScheduleWorkerNodeGroup(worker2, 1),
),
framework.WithBottleRocket122(),
framework.WithBottleRocket123(),
)
}
Loading

0 comments on commit 7683e8a

Please sign in to comment.