-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Initial kubetest2 structure for e2e testing #10031
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
Conversation
This creates a new go module for the e2e code and the kubetest2 skeleton. Most of the kubetest2 code was copied from sigs.k8s.io/kubetest2/kubetest2-gke. Currently only building (`make gcs-publish-ci`) is in place. I used test-infra/scenarios/kubernetes_e2e.py as reference, removing env and make variables that are no longer needed. Instructions: ``` cd tests/e2e go install sigs.k8s.io/kubetest2 go install ./kubetest2-kops kubetest2 kops -v 9 --build --stage-location=gs://foobar/ --kops-root=../../ # runs make gcs-publish-ci and exits ```
1f5d236
to
9703c64
Compare
/cc @justinsb by request |
@rifelpet: GitHub didn't allow me to request PR reviews from the following users: in, the, request, interested, meeting, testing, at, hacktoberfest, by, being, e2e, since, you. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I am interested also :) |
This is a great start! I wonder if we should think of doing update tests too. Spin up a cluste with spec A, apply spec B, run some e2e. To test that e.g ELB -> NLB migration ends up in a working cluster. This test suite probably don't have to run that often, maybe just pre-release. |
func (d *deployer) initialize() error { | ||
if d.commonOptions.ShouldBuild() { | ||
if err := d.verifyBuildFlags(); err != nil { | ||
return fmt.Errorf("init failed to check build flags: %s", err) |
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.
%w or %v I think
func bindFlags(d *deployer) *pflag.FlagSet { | ||
flags, err := gpflag.Parse(d) | ||
if err != nil { | ||
klog.Fatalf("unable to generate flags from deployer") |
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.
Nit: please include the error in the message
A great start - let's merge and iterate! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justinsb, rifelpet 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 |
ref: #9598
This creates a new go module for the e2e code and the kubetest2 skeleton.
Most of the kubetest2 code was copied from sigs.k8s.io/kubetest2/kubetest2-gke.
Currently only building (
make gcs-publish-ci
) is in place.I used test-infra/scenarios/kubernetes_e2e.py as reference, removing environment and make variables that are no longer needed.
Notes:
This is a new go module so that anyone importing kops does not end up with transitive dependencies used only by e2e testing. (
gopls
users may need to update to 0.5.1 for multi-module workspace support)I elected not to vendor the dependencies as suggested by Justin
I envision kops-specific e2e tests could live in
tests/e2e/
as well as Cluster and IG template files from which we can launch clusters. (we'll need to templatize them to adjust the cluster name, region and other fields which are specific to each job run)For presubmits we'll compile kubetest2-kops with the same commit being tested, and install kubetest2 with the version defined in go.mod. Because periodics don't clone the kops repo we'll need a way to use a specific kubetest2-kops binary. A few ideas for this:
We'll need to keep in mind release branching and which versions of kubetest2-kops we use to test which release branches of kops.
Next Steps:
kops create cluster
andkops delete cluster
. This will require determining all the environment variables and file paths that are in place for the prow jobs, including setting up the boskos client.Instructions:
Help text: