From 9f458ecdba45c75c56292b7d3d4c6f393b86165d Mon Sep 17 00:00:00 2001 From: ericgraf Date: Wed, 21 Aug 2024 13:54:51 -0400 Subject: [PATCH 1/6] Set specific awsClusterRoleIdentityName for eks, private and normal e2e tests. --- providers/capa/private/test_data/cluster_values.yaml | 3 +++ providers/capa/standard/test_data/cluster_values.yaml | 3 +++ providers/eks/standard/test_data/cluster_values.yaml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/providers/capa/private/test_data/cluster_values.yaml b/providers/capa/private/test_data/cluster_values.yaml index ef00ba46..62d2e7b0 100644 --- a/providers/capa/private/test_data/cluster_values.yaml +++ b/providers/capa/private/test_data/cluster_values.yaml @@ -1 +1,4 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown +global: + providerSpecific: + awsClusterRoleIdentityName: team-tinkerers-giantswarm-goat-wc-e2e diff --git a/providers/capa/standard/test_data/cluster_values.yaml b/providers/capa/standard/test_data/cluster_values.yaml index ef00ba46..7308e59f 100644 --- a/providers/capa/standard/test_data/cluster_values.yaml +++ b/providers/capa/standard/test_data/cluster_values.yaml @@ -1 +1,4 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown +global: + providerSpecific: + awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e diff --git a/providers/eks/standard/test_data/cluster_values.yaml b/providers/eks/standard/test_data/cluster_values.yaml index ef00ba46..1d874e1b 100644 --- a/providers/eks/standard/test_data/cluster_values.yaml +++ b/providers/eks/standard/test_data/cluster_values.yaml @@ -1 +1,4 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown +global: + providerSpecific: + awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e-eks From ddab6f1994440c9361e94dcff2c102740269cfb5 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Thu, 5 Sep 2024 11:13:45 +0100 Subject: [PATCH 2/6] Added cluster role identity to more test suites Signed-off-by: Marcus Noble --- providers/capa/cilium-eni-mode/test_data/cluster_values.yaml | 2 ++ providers/capa/upgrade/test_data/cluster_values.yaml | 2 ++ providers/eks/upgrade/test_data/cluster_values.yaml | 3 +++ 3 files changed, 7 insertions(+) diff --git a/providers/capa/cilium-eni-mode/test_data/cluster_values.yaml b/providers/capa/cilium-eni-mode/test_data/cluster_values.yaml index 88abc8c9..a31da0ff 100644 --- a/providers/capa/cilium-eni-mode/test_data/cluster_values.yaml +++ b/providers/capa/cilium-eni-mode/test_data/cluster_values.yaml @@ -1,5 +1,7 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown global: + providerSpecific: + awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e connectivity: # These two settings enable Cilium ENI mode network: diff --git a/providers/capa/upgrade/test_data/cluster_values.yaml b/providers/capa/upgrade/test_data/cluster_values.yaml index 194b6a14..3e14b2b2 100644 --- a/providers/capa/upgrade/test_data/cluster_values.yaml +++ b/providers/capa/upgrade/test_data/cluster_values.yaml @@ -1,4 +1,6 @@ global: + providerSpecific: + awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e nodePools: # Here we override the default values from cluster-standup-teardown and make the following changes: # diff --git a/providers/eks/upgrade/test_data/cluster_values.yaml b/providers/eks/upgrade/test_data/cluster_values.yaml index ef00ba46..1d874e1b 100644 --- a/providers/eks/upgrade/test_data/cluster_values.yaml +++ b/providers/eks/upgrade/test_data/cluster_values.yaml @@ -1 +1,4 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown +global: + providerSpecific: + awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e-eks From c6e946fadab9b3ba5d1626936e127619c9062cd0 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Thu, 5 Sep 2024 11:15:04 +0100 Subject: [PATCH 3/6] Updated changelog Signed-off-by: Marcus Noble --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eca00204..854411ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Use dedicated AWS Accounts for the different CAPA test suites (Private, EKS and "normal") + ## [1.68.0] - 2024-09-06 ### Fixed From d804874337db71a7687e045f0dd341b963691123 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Thu, 5 Sep 2024 11:27:13 +0100 Subject: [PATCH 4/6] Remove team name from value Signed-off-by: Marcus Noble --- providers/capa/cilium-eni-mode/test_data/cluster_values.yaml | 2 +- providers/capa/private/test_data/cluster_values.yaml | 2 +- providers/capa/standard/test_data/cluster_values.yaml | 2 +- providers/capa/upgrade/test_data/cluster_values.yaml | 2 +- providers/eks/standard/test_data/cluster_values.yaml | 2 +- providers/eks/upgrade/test_data/cluster_values.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/providers/capa/cilium-eni-mode/test_data/cluster_values.yaml b/providers/capa/cilium-eni-mode/test_data/cluster_values.yaml index a31da0ff..731fda58 100644 --- a/providers/capa/cilium-eni-mode/test_data/cluster_values.yaml +++ b/providers/capa/cilium-eni-mode/test_data/cluster_values.yaml @@ -1,7 +1,7 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown global: providerSpecific: - awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e + awsClusterRoleIdentityName: giantswarm-grizzly-wc-e2e connectivity: # These two settings enable Cilium ENI mode network: diff --git a/providers/capa/private/test_data/cluster_values.yaml b/providers/capa/private/test_data/cluster_values.yaml index 62d2e7b0..edc59a29 100644 --- a/providers/capa/private/test_data/cluster_values.yaml +++ b/providers/capa/private/test_data/cluster_values.yaml @@ -1,4 +1,4 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown global: providerSpecific: - awsClusterRoleIdentityName: team-tinkerers-giantswarm-goat-wc-e2e + awsClusterRoleIdentityName: giantswarm-goat-wc-e2e diff --git a/providers/capa/standard/test_data/cluster_values.yaml b/providers/capa/standard/test_data/cluster_values.yaml index 7308e59f..6da26864 100644 --- a/providers/capa/standard/test_data/cluster_values.yaml +++ b/providers/capa/standard/test_data/cluster_values.yaml @@ -1,4 +1,4 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown global: providerSpecific: - awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e + awsClusterRoleIdentityName: giantswarm-grizzly-wc-e2e diff --git a/providers/capa/upgrade/test_data/cluster_values.yaml b/providers/capa/upgrade/test_data/cluster_values.yaml index 3e14b2b2..7f080634 100644 --- a/providers/capa/upgrade/test_data/cluster_values.yaml +++ b/providers/capa/upgrade/test_data/cluster_values.yaml @@ -1,6 +1,6 @@ global: providerSpecific: - awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e + awsClusterRoleIdentityName: giantswarm-grizzly-wc-e2e nodePools: # Here we override the default values from cluster-standup-teardown and make the following changes: # diff --git a/providers/eks/standard/test_data/cluster_values.yaml b/providers/eks/standard/test_data/cluster_values.yaml index 1d874e1b..16534def 100644 --- a/providers/eks/standard/test_data/cluster_values.yaml +++ b/providers/eks/standard/test_data/cluster_values.yaml @@ -1,4 +1,4 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown global: providerSpecific: - awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e-eks + awsClusterRoleIdentityName: giantswarm-grizzly-wc-e2e-eks diff --git a/providers/eks/upgrade/test_data/cluster_values.yaml b/providers/eks/upgrade/test_data/cluster_values.yaml index 1d874e1b..16534def 100644 --- a/providers/eks/upgrade/test_data/cluster_values.yaml +++ b/providers/eks/upgrade/test_data/cluster_values.yaml @@ -1,4 +1,4 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown global: providerSpecific: - awsClusterRoleIdentityName: team-tinkerers-giantswarm-grizzly-wc-e2e-eks + awsClusterRoleIdentityName: giantswarm-grizzly-wc-e2e-eks From 076ef42be475a38beeb7584e2ba09e25447f2b25 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Thu, 5 Sep 2024 15:08:03 +0100 Subject: [PATCH 5/6] Updated readme Signed-off-by: Marcus Noble --- README.md | 57 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 84004d87..ba0cbd9c 100644 --- a/README.md +++ b/README.md @@ -4,53 +4,60 @@ ## ☑️ Requirements -* A valid Kubeconfig with the required context defined. (See [cluster-standup-teardown](https://github.com/giantswarm/cluster-standup-teardown) for more details.) +* A valid Kubeconfig, pointing at a `stable-testing` MC, with the required context defined. (See [cluster-standup-teardown](https://github.com/giantswarm/cluster-standup-teardown) for more details.) * Install [ginkgo](https://onsi.github.io/ginkgo/) on your machine: `go install github.com/onsi/ginkgo/v2/ginkgo`. * The `E2E_KUBECONFIG` environment variable set to point to the path of the above kubeconfig. Optional: + * When `E2E_WC_NAME` and `E2E_WC_NAMESPACE` environment variables are set, the tests will run against the specified WC on the targeted MC. If one or both of the variables isn't set, the tests will create their own WC. * When `TELEPORT_IDENTITY_FILE` environment variable is set to point to the path of a valid teleport credential, the test will check if E2E WC is registered in Teleport cluster (`teleport.giantswarm.io`). If it isn't set, the test will be skipped. ## 🏃 Running Tests -Assuming the above requirements are fulfilled: - > [!NOTE] > If you need the current kubeconfig its best to pull it from the `cluster-test-suites-mc-kubeconfig` Secret on the Tekton cluster. -If you need the current teleport identity file its best to pull it from the `teleport-identity-output` Secret on the Tekton cluster. +> +> If you need the current teleport identity file its best to pull it from the `teleport-identity-output` Secret on the Tekton cluster. -Running the all test suites: +> [!IMPORTANT] +> The test suites are designed to be run against `stable-testing` MCs and possibly require some config or resources that already exists on those MCs. +> +> If you require running the tests against a different MC please reach out to [#Team-Tenet](https://gigantic.slack.com/archives/C07KSM2E51A) to discuss any pre-requisites that might be needed. -```sh -E2E_KUBECONFIG=/path/to/kubeconfig.yaml ginkgo --timeout 4h -v -r . -``` +Assuming the above requirements are fulfilled: -Running a single provider (e.g. `capa`): +* Running all the test suites: -```sh -E2E_KUBECONFIG=/path/to/kubeconfig.yaml ginkgo --timeout 4h -v -r ./providers/capa -``` + ```sh + E2E_KUBECONFIG=/path/to/kubeconfig.yaml ginkgo --timeout 4h -v -r . + ``` -Running a single test suite (e.g. the `capa` `standard` test suite) +* Running a single provider (e.g. `capa`): -```sh -E2E_KUBECONFIG=/path/to/kubeconfig.yaml ginkgo --timeout 4h -v -r ./providers/capa/standard -``` + ```sh + E2E_KUBECONFIG=/path/to/kubeconfig.yaml ginkgo --timeout 4h -v -r ./providers/capa + ``` -Running a single test suite with teleport test enabled (e.g. the `capa` `standard` test suite): +* Running a single test suite (e.g. the `capa` `standard` test suite) -```sh -kubectl get secrets teleport-identity-output -n tekton-pipelines --template='{{.data.identity}}' | base64 -D > teleport-identity-file.pem + ```sh + E2E_KUBECONFIG=/path/to/kubeconfig.yaml ginkgo --timeout 4h -v -r ./providers/capa/standard + ``` -E2E_KUBECONFIG=/path/to/kubeconfig.yaml TELEPORT_IDENTITY_FILE=/path/to/teleport-identity-file.pem -v -r ./providers/capa/standard -``` +* Running a single test suite with teleport test enabled (e.g. the `capa` `standard` test suite): -Running with Docker: + ```sh + kubectl get secrets teleport-identity-output -n tekton-pipelines --template='{{.data.identity}}' | base64 -D > teleport-identity-file.pem -```sh -docker run --rm -it -v /path/to/kubeconfig.yaml:/kubeconfig.yaml -e E2E_KUBECONFIG=/kubeconfig.yaml quay.io/giantswarm/cluster-test-suites ./ -``` + E2E_KUBECONFIG=/path/to/kubeconfig.yaml TELEPORT_IDENTITY_FILE=/path/to/teleport-identity-file.pem -v -r ./providers/capa/standard + ``` + +* Running with Docker: + + ```sh + docker run --rm -it -v /path/to/kubeconfig.yaml:/kubeconfig.yaml -e E2E_KUBECONFIG=/kubeconfig.yaml quay.io/giantswarm/cluster-test-suites ./ + ``` ### Testing with an in-progress Release CR From bde6f2fdf8b43c957ff5ce4995df5f7cd6f5ba0d Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Fri, 6 Sep 2024 13:31:29 +0100 Subject: [PATCH 6/6] Remove account override for private Signed-off-by: Marcus Noble --- providers/capa/private/test_data/cluster_values.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/providers/capa/private/test_data/cluster_values.yaml b/providers/capa/private/test_data/cluster_values.yaml index edc59a29..ef00ba46 100644 --- a/providers/capa/private/test_data/cluster_values.yaml +++ b/providers/capa/private/test_data/cluster_values.yaml @@ -1,4 +1 @@ # Values provided here merge on top of the default values found in https://github.com/giantswarm/cluster-standup-teardown -global: - providerSpecific: - awsClusterRoleIdentityName: giantswarm-goat-wc-e2e