Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

feat: add COSI test suite using Chainsaw #94

Merged
merged 10 commits into from
Sep 30, 2024

Conversation

shanduur
Copy link
Contributor

@shanduur shanduur commented Aug 23, 2024

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.

  1. COSI Test Suite Implementation:

    • Added an end-to-end (E2E) test suite for COSI, focusing on various authentication methods for S3 and Azure.
  2. Test Generator:

    • Implemented a test generator to dynamically create tests, reducing manual effort and ensuring consistency across the test suite.
  3. KinD Cluster Configuration:

    • Configured ctlptl for 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.

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.

@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 23, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 23, 2024
@shanduur shanduur force-pushed the cosi-test-chainsaw branch 3 times, most recently from 60bfc05 to b30d99a Compare September 3, 2024 17:52
@shanduur shanduur marked this pull request as ready for review September 3, 2024 17:53
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 3, 2024
@shanduur
Copy link
Contributor Author

shanduur commented Sep 4, 2024

/cc @BlaineEXE

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 5, 2024
@shanduur shanduur requested a review from BlaineEXE September 5, 2024 16:35
@BlaineEXE
Copy link
Contributor

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?

@shanduur
Copy link
Contributor Author

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.

Signed-off-by: Mateusz Urbanek <[email protected]>
@shanduur
Copy link
Contributor Author

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.

@BlaineEXE
Copy link
Contributor

Looks like a great starting point to me. Thanks @shanduur !

@BlaineEXE
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 30, 2024
@k8s-ci-robot
Copy link
Contributor

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 6c59921 into kubernetes-retired:monorepo Sep 30, 2024
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants