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

kubetest: specify kind node image and update stable version #14477

Merged
merged 1 commit into from
Nov 5, 2019

Conversation

cofyc
Copy link
Member

@cofyc cofyc commented Sep 26, 2019

  • specify prebuilt node image (https://hub.docker.com/r/kindest/node/tags): this is useful to start a cluster quickly (--build skipped) to test third-party projects, e.g. operators.
  • specify the binary version of kind
    • build requires kind source
    • stable uses hard-code version, however, 0.2.0 is too old to use. I think it's convenient to specify kind binary version to download here without breaking anything. updated to use latest stable version v0.5.1

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 26, 2019
@k8s-ci-robot k8s-ci-robot added area/kubetest sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Sep 26, 2019
@cofyc
Copy link
Member Author

cofyc commented Sep 26, 2019

/assign @BenTheElder @neolit123

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

This is cool, thanks!

I have some minor concern about trying to support every version, as kind does not yet supply a 100% stable CLI interface, we have some minor logging related changes in HEAD vs the last release currently...

kindClusterName = flag.String("kind-cluster-name", kindClusterNameDefault,
"(kind only) Name of the kind cluster.")
kindNodeImage = flag.String("kind-node-image", kindNodeImageLatest, "(kind only) name:tag of the node image to start the cluster")
Copy link
Member

Choose a reason for hiding this comment

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

This should probably default to "" instead, and if we built then it should be replaced with what we built and if not then the kind flag should be unset.

If the flag is actually set, directly pass it through.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks for your suggestion! I've updated the PR.

@BenTheElder
Copy link
Member

It might be best to just update the default version to v0.5.1

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 26, 2019
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 26, 2019
@cofyc
Copy link
Member Author

cofyc commented Sep 26, 2019

It might be best to just update the default version to v0.5.1

done

if buildNodeImage != "" {
args = append(args, "--image="+buildNodeImage)
// override user-specified node image
d.kindNodeImage = buildNodeImage
Copy link
Member Author

@cofyc cofyc Sep 26, 2019

Choose a reason for hiding this comment

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

I override the node image with kindNodeImageLatest when the build is enabled, because I think it will confuse the user to start a cluster with kindest/node:v1.15.0 but it might not be kindest/node:v1.15.0.

Copy link
Member

Choose a reason for hiding this comment

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

i'm not sure what to do here. long term i'd like to reccomend not using kubetest for using kind.

@cofyc cofyc changed the title kubetest: able to specify kind node image and binary version kubetest: specify kind node image and update stable version Sep 26, 2019
@cofyc
Copy link
Member Author

cofyc commented Sep 26, 2019

/hold
kindBinaryStableHashes must be updated.

@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 26, 2019
@cofyc
Copy link
Member Author

cofyc commented Sep 26, 2019

/hold cancel

@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 26, 2019
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/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 26, 2019
@cofyc
Copy link
Member Author

cofyc commented Oct 7, 2019

@BenTheElder what do you think?

@cofyc
Copy link
Member Author

cofyc commented Oct 21, 2019

@BenTheElder any concerns?

@BenTheElder
Copy link
Member

I'm going to defer to @neolit123
I intend to make kubernetes easy to test without kubetest kubernetes-sigs/kind#986, for other use cases using kind directly should be fine (and actually easier, eg installing kubetest is rather painful right now)

@BenTheElder
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2019
@neolit123
Copy link
Member

neolit123 commented Nov 5, 2019

i think the PR is mostly fine, yet i think kubetest/kind might be getting deprecated.
until now only the kubeadm e2e jobs used this deployer.

there might be some users of this deployer out there, but using kind without kubetest should be preferred:

I intend to make kubernetes easy to test without kubetest kubernetes-sigs/kind#986, for other use cases using kind directly should be fine (and actually easier, eg installing kubetest is rather painful right now)

+1

@k8s-ci-robot k8s-ci-robot merged commit 057be1f into kubernetes:master Nov 5, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Nov 5, 2019
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. area/kubetest 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. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants