crossplane-contrib / provider-upjet-aws

Official AWS Provider for Crossplane by Upbound.
https://marketplace.upbound.io/providers/upbound/provider-aws
Apache License 2.0
137 stars 112 forks source link

Add e2e tests for ProviderConfigs #1320

Open erhancagirici opened 1 month ago

erhancagirici commented 1 month ago

Description of your changes

Introduces automatede2e tests for provider configs,

provider-aws supports several provider config scenarios such as IRSA, WebIdentity. To test these scenarios, one needs to prepare an testing environment manually, and testing auth methods like IRSA is only possible with an EKS cluster .

The change aims to provide an automated standard testing environment in EKS and conduct e2e tests for several predetermined scenarios. It also provides a base for extending the tests.

For the testing environment and the tests a new configuration package is introduced specifically targeting e2e testing. It introduces a new composite resource xe2etestclusters.platformref.aws.upbound.io, that provisions an IRSA-enabled EKS, deploys crossplane, providers, provider configs, and some built-in testing MRs.

Currently, built-in scenarios include:

Starting with a local crossplane control plane (possibly in a local KinD cluster), when a E2ETestCluster.platformref.aws.upbound.io claim is created, all above will be provisioned and tested. If further tests need to be conducted with different provider configs, one can keep the claim and apply desired provider config and MR manifests to the remote EKS testing cluster, via provider-kubernetes & produced k8s provider config .

See readme at path e2e/providerconfig-aws-e2e-test/README.md further details on Structure & Usage.

I have:

How has this code been tested

Tested manually and the newly introduced providerconfig-e2e make target.