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

Introduce the --use flag when creating a cluster #517

Closed
wants to merge 1 commit into from

Conversation

frederiko
Copy link

@frederiko frederiko commented May 10, 2019

This PR introduces the --use that sets up the newly created cluster as the current context. It reads the required configuration from kind-config-<cluster-name> and adds the context to $HOME/.kube/config.

@k8s-ci-robot
Copy link
Contributor

Welcome @frederiko!

It looks like this is your first PR to kubernetes-sigs/kind 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kind has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 10, 2019
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 10, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: frederiko
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: munnerz

If they are not already assigned, you can assign the PR to them by writing /assign @munnerz in a comment when ready.

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
Copy link
Contributor

Hi @frederiko. Thanks for your PR.

I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 10, 2019
@frederiko
Copy link
Author

/assign @munnerz

@frederiko frederiko changed the title introduce the --use flag when creating a cluster Introduce the --use flag when creating a cluster May 10, 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.

@frederiko
thanks for the PR.
added minor comments.

also please squash your commits to 1.
thanks.

pkg/util/kubeconfig.go Outdated Show resolved Hide resolved
pkg/util/kubeconfig.go Outdated Show resolved Hide resolved
cmd/kind/create/cluster/createcluster.go Outdated Show resolved Hide resolved
@BenTheElder
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 10, 2019
@BenTheElder
Copy link
Member

looks like there's a dependency issue, go.mod also seems to not be updated despite the new import 😬

@aojea
Copy link
Contributor

aojea commented May 12, 2019

Jobs are failing with the following error

build sigs.k8s.io/kind: cannot load k8s.io/api/admissionregistration/v1alpha1: cannot find module providing package k8s.io/api/admissionregistration/v1alpha1

pkg/util/kubeconfig.go Outdated Show resolved Hide resolved
@frederiko frederiko force-pushed the usecluster branch 4 times, most recently from a1f1711 to 571d698 Compare May 14, 2019 01:02
@BenTheElder BenTheElder added this to the 0.4 milestone May 15, 2019
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 16, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 16, 2019
@frederiko
Copy link
Author

/test pull-kind-conformance-parallel

@BenTheElder
Copy link
Member

[this feature is really neat, there's just been a lot of other things to tackle a little more urgently.]

looking back over this, I suspect for it to work properly when multiple clusters are involved we need something like #512

I'm also slightly hesisitant to expand dependencies on upstream kubernetes since we test kubernetes with kind 🤔 ... will check what kops does since they're in a similar boat

@BenTheElder BenTheElder modified the milestones: v0.4.0, v0.5.0 Jun 25, 2019
@frederiko
Copy link
Author

frederiko commented Jun 25, 2019 via email

@BenTheElder
Copy link
Member

Er it certainly has value, I'm just wondering if it's worth it to implement it without client-go or not and if we've reviewed this for all of the potential problem cases... 🤔

Cleaning is definitely another issue to think about, I was thinking about previous problems merging multiple kind configs because of the identical users (hence #512).

Again, worth wise it's not that it isn't worth it at all! thank you for the PR! :-)

We've just been fixing various bugs and kubernetes testing needs, lots going on 😅v0.4.0 was supposed to come out today and didn't due to some of those... I want to look at this more closely for the next release.

@BenTheElder
Copy link
Member

I think a lot of people would really appreciate this feature 🙃

@BenTheElder BenTheElder removed this from the v0.5.0 milestone Aug 20, 2019
@k8s-ci-robot
Copy link
Contributor

@frederiko: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kind-conformance-parallel-1-15 8663e1b link /test pull-kind-conformance-parallel-1-15
pull-kind-unit 8663e1b link /test pull-kind-unit
pull-kind-conformance-parallel-1-16 8663e1b link /test pull-kind-conformance-parallel-1-16
pull-kind-e2e-kubernetes 8663e1b link /test pull-kind-e2e-kubernetes

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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 understand the commands that are listed here.

@frederiko
Copy link
Author

Hi @BenTheElder, is there any intention on bringing this PR back to life again? I could try resolving the conflicts if you'd like.

@BenTheElder
Copy link
Member

we are discussing something similar in #850 before making changes 😅
I held on coming back to implementing #850 to ensure we've finished resolving some stability issues for kubernetes CI.

@BenTheElder
Copy link
Member

#850 is largely implemented to closely march other tools, including setting kubeconfig with a more complete behavior match to client-go including importantly file "locks" for modifying kubeconfigs.

Thanks for the PR 🙃

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

6 participants