feat: add COSI test suite using Chainsaw
This pull request introduces a new COSI (Container Object Storage Interface) test suite using Chainsaw, along with several enhancements and preparations for dynamic test generation.
-
COSI Test Suite Implementation:
- Added an end-to-end (E2E) test suite for COSI, focusing on various authentication methods for S3 and Azure.
-
Test Generator:
- Implemented a test generator to dynamically create tests, reducing manual effort and ensuring consistency across the test suite.
-
KinD Cluster Configuration:
- Configured
ctlptlfor setting up a KinD (Kubernetes in Docker) cluster to facilitate testing in a controlled environment. TODO: this needs future updates, e.g. Makefile targets, to ensure that tests can be run locally, including installation of sample driver, CRDs and controller.
- Configured
The dynamic test generator is now in place, which will allow for easier updates and extensions to the test suite in future iterations. This PR is foundational for future enhancements and ensures that the COSI functionality is thoroughly tested across different authentication mechanisms.
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
/cc @BlaineEXE
In this other PR, I'm adding the 3 remaining e2e/lint targets that are suggested by Kubebuilder's template: https://github.com/kubernetes-sigs/container-object-storage-interface-api/pull/96/files
I think it would be nice to see how this PR would integrate with make in the test-e2e target. Presumably, the tooling would have to install ctlptl and chainsaw, set up kind, and then run the tests, which seems fairly straighforward.
If you think it would be better to do the tooling in another PR, maybe a test/e2e/readme.md could give a simple bullet list instruction about how we can run these ourselves manually?
I fully tested that on Linode COSI Driver using the following values:
driverName: objectstorage.cosi.linode.com
deletionPolicy: "Delete" # "Retain"
bucketClassParams:
cosi.linode.com/v1/region: us-east
cosi.linode.com/v1/acl: private
cosi.linode.com/v1/cors: disabled
bucketAccessClassParams:
cosi.linode.com/v1/permissions: read_write
authenticationType: "Key" # "IAM"
bucketClaimProtocols: ["S3"]
bucketAccessProtocol: "S3"
Test suite run in ~22s, including full Bucket/BucketAccess/BucketClaim provisioning and secret schema validation.
I included a simple readme, however, I am not adding any make targets yet. I think it will be better to do those in subsequent PRs.
Looks like a great starting point to me. Thanks @shanduur !
/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: BlaineEXE, shanduur
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [BlaineEXE,shanduur]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment