-
Notifications
You must be signed in to change notification settings - Fork 173
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
Simplify cluster instantiation in tests #407
Simplify cluster instantiation in tests #407
Conversation
I don't think an ADR is needed here, but happy to write one if the team feels it is needed. Still need to update docs, will do that next after I ensure this is working how I expect it to. Since the whole thing is about tests, I'll go ahead and pull that label |
Updated description based on offline conversation with @YrrepNoj |
@YrrepNoj ready for you to look at this based on what we talked about. Still need to update docs but I think it's mostly there. |
Ready for review and merge |
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.
Worked together in person to address comments.
Reading back through all this rn after getting back from spring break, give me a few to verify too before merge please. Also note @RothAndrew you'll probably want to squash your commits as you have an unsigned one blocking merge. |
The commit is signed, but for some reason GitHub is not seeing it as verified, even though the same GPG key was used for it as all the other commits. I'm having trouble figuring out how to squash/force-push to fix since there's a Merge Commit in the middle. |
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.
Overall I think this will be an improvement to the testing flow, but some custom logic may need to use the main codebase instead and we should be careful to make sure we're not doing something different than how a normal user would use Zarf as that's the point of E2E is to be as real as possible. Thanks for working this.
368bab2
to
aeee554
Compare
Description
Simplifies the handling of kubernetes clusters from this logic:
KUBECONFIG
file (~/.kube/config
)kind
ork3d
only do that one~/.kube/config
fileTo this:
provided
,kind
,k3d
, ork3s
and error out if it isn'tkind
ork3d
-- create that cluster using the associated golang library, using a temporary file for the KUBECONFIG.provided
-- Use the provided cluster, using the existing KUBECONFIGk3s
-- Usezarf init --components k3s
to create the cluster andzarf destroy
to delete it (done as part of each test so that each test gets a fresh cluster)provided
ork3s
, destroy the cluster and temporary KUBECONFIG fileThe pipeline will provide the KinD cluster, and will expect the tests to create the K3d and K3s clusters
Related Issue
Fixes #406
Related to #373 (except for needing a new e2e test)
Type of change
Checklist before merging
needs-tests
label)needs-docs
label)needs-adr
label) [ 1 2 3 ]