Skip to content
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

[Clusterloader2] Implement a clusterloader2 tester #53

Merged
merged 6 commits into from
Sep 24, 2020

Conversation

amwat
Copy link
Contributor

@amwat amwat commented Sep 15, 2020

Create an initial implementation of clusterloader2 tester.
Currently requires having https://github.com/kubernetes/perf-tests checked out.

/cc @BenTheElder

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 15, 2020
@@ -63,6 +63,17 @@ type deployer struct {
verbosity int // --verbosity for kind
}

func (d *deployer) Kubeconfig() (string, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you referring to https://github.com/kubernetes-sigs/kind/blob/master/pkg/cluster/internal/kubeconfig/internal/kubeconfig/paths.go#L30-L43 ?

I think we are only missing the KUBECONFIG env handling from there. will add as a follow up. This should solve the basic case when nothing is set.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~HOME is also more complex on windows, off the top of my head.

I think this deployer should probably have it's own stable computed paths and use those consistently (like $HOME/.kube/kubetest2-kind-$cluster)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I'm planning on sending kind deployer specific changes separately soon and the top-level artifacts organization changes, will fix this more robustly there.

Current change is only to make quick testing of the clusterloader2 tester locally with the kind deployer easy.

TestOverrides string `desc:"Comma separated list of paths to the config override files. The latter overrides take precedence over changes in former files."`
TestConfigs string `desc:"Comma separated list of paths to test config files."`
Provider string `desc:"The type of cluster provider used (e.g gke, gce, skeleton)"`
KubeConfig string `desc:"Path to kubeconfig"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we inject the kubeconfig env to all testers?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(this also allows us to do multi-file for multi-cluster)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already do, this is an override. And yeah clusterloader2 doesn't support multi kubeconfig yet :/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the usage text should probably clarify that this is an override?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -90,8 +101,8 @@ func bindFlags(d *deployer) *pflag.FlagSet {
return flags
}

// assert that deployer implements types.Deployer
var _ types.Deployer = &deployer{}
// assert that deployer implements types.DeployerWithKubeconfig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any deployer that doesn't have kubeconfig?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make this a standard part of the API for deployer, a requirement for kubetest2, but that can be a follow-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

@BenTheElder
Copy link
Member

/lgtm
/approve
/hold
some nits

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 21, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amwat, BenTheElder

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 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 21, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 21, 2020
@amwat
Copy link
Contributor Author

amwat commented Sep 23, 2020

/hold cancel
most of the actual kind deployer specific changes will be done in a follow up.
This PR will now enable basic clusterloader2 testing.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 23, 2020
@amwat
Copy link
Contributor Author

amwat commented Sep 23, 2020

/cc @mm4tt as FYI

@k8s-ci-robot
Copy link
Contributor

@amwat: GitHub didn't allow me to request PR reviews from the following users: mm4tt, as, FYI.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @mm4tt as FYI

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.

@BenTheElder
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 24, 2020
@k8s-ci-robot k8s-ci-robot merged commit 6e6ad4b into kubernetes-sigs:master Sep 24, 2020
@amwat amwat deleted the cl2 branch September 24, 2020 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

3 participants