-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add e2e tests for ProviderConfigs #1320
Add e2e tests for ProviderConfigs #1320
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only made it partway through before having to pause my review. So far my comments are mostly just questions or optional suggestions.
# It first builds and publishes the | ||
# provider-family-aws, provider-aws-ec2 and provider-aws-rds. | ||
# Then triggers the e2e provider config tests via `make`, | ||
# which resides in the `e2e/providerconfig-aws-e2e-test` directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a name that's longer than necessary to convey the information. How about just e2e/providerconfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with the renaming the folder. My reasoning was, since this directory is also an XP configuration package, I just named it the same with the configuration package name.
The reason for this long name for the configuration package is that we could have other testing configuration packages for other providers as well.
Makefile
Outdated
AWS_FAMILY_PACKAGE_IMAGE="$(XPKG_REG_ORGS)/provider-family-aws:$(VERSION)" \ | ||
AWS_EC2_PACKAGE_IMAGE="$(XPKG_REG_ORGS)/provider-aws-ec2:$(VERSION)" \ | ||
AWS_RDS_PACKAGE_IMAGE="$(XPKG_REG_ORGS)/provider-aws-rds:$(VERSION)" \ | ||
TARGET_CROSSPLANE_VERSION="1.15.2" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised to see this, as I thought there was a difference in crossplane versions >= 1.15.0 related to how it identifies family providers that resulted in the providers we build locally being identified as being from different families, and breaking access to the ProviderConfig and ProviderConfigUsage resources.
Assuming your tests are working, it would be great to figure out what's different about them and the current make e2e
config that causes make e2e
to fail with crossplane versions >= 1.15.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was not aware of such an issue, and not sure if it still exists.
What I did here was that, I disabled dependency resolution while creating the providers in the target EKS cluster, and setting them up manually. Maybe this is the reason?
# ==================================================================================== | ||
# Setup XPKG | ||
XPKG_DIR = $(shell pwd)/package | ||
XPKG_IGNORE = .github/workflows/*.yaml,.github/workflows/*.yml,examples/*.yaml,.work/uptest-datasource.yaml,.cache/**,_output/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to entirely exclude .github/**
, .work/**
, examples/**
and examples-generated/**
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The makefile was borrowed from platform-ref-aws
configuration as is, can change those, no strong preference regarding exclusions.
|
||
e2e-lite: build controlplane.up local.xpkg.deploy.configuration.$(PROJECT_NAME) | ||
|
||
uptest-e2e: $(UPTEST) $(KUBECTL) $(KUTTL) $(YQ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These names are getting confusing. We already have make uptest
and make e2e
in the root makefile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erhancagirici LGTM. Thank you very much for your great effort in this PR and adding the very critical e2e tests for different type of provider configs.
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
329f265
to
c533abf
Compare
Signed-off-by: Erhan Cagirici <erhan@upbound.io>
c533abf
to
1d70275
Compare
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, viaprovider-kubernetes
& produced k8s provider config .See readme at path
e2e/providerconfig-aws-e2e-test/README.md
further details on Structure & Usage.I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Tested manually and the newly introduced
providerconfig-e2e
make target.