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

✨ Allow setting "UseExistingCluster" via environment #449

Merged

Conversation

adohe-zz
Copy link

support setting "UseExistingCluster" via OS Env, address #222

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 27, 2019
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 27, 2019
@adohe-zz
Copy link
Author

/assign @DirectXMan12

@adohe-zz adohe-zz changed the title ✨ Allow setting "UseExistingCluster" via environment :sparkles Allow setting "UseExistingCluster" via environment May 29, 2019
@@ -87,7 +89,7 @@ type Environment struct {
// UseExisting indicates that this environments should use an
// existing kubeconfig, instead of trying to stand up a new control plane.
// This is useful in cases that need aggregated API servers and the like.
UseExistingCluster bool
UseExistingCluster *bool
Copy link
Member

Choose a reason for hiding this comment

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

IMO we don't have to use a boolean pointer. And this is actually a breaking change, since you change the type of a public struct.

@adohe-zz adohe-zz force-pushed the support_use_existing_cluster branch from 079570f to 31d8c66 Compare May 30, 2019 14:03
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 30, 2019
@adohe-zz
Copy link
Author

adohe-zz commented May 30, 2019

/assign @mengqiy

Copy link
Member

@mengqiy mengqiy 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 May 30, 2019
@mengqiy mengqiy changed the title :sparkles Allow setting "UseExistingCluster" via environment ✨ Allow setting "UseExistingCluster" via environment May 30, 2019
@mengqiy mengqiy added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 30, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: adohe

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 merged commit 5320b25 into kubernetes-sigs:master May 30, 2019
@DirectXMan12
Copy link
Contributor

I think we may want this to be a pointer -- this means you can never explicitly opt out of useexistingcluster.

@mengqiy
Copy link
Member

mengqiy commented Jun 1, 2019

Discussed this with Solly a bit offline.
In sum, if we need to make breaking changes to make things work well, now it's time (v0.2.0). :)

@adohe-zz adohe-zz deleted the support_use_existing_cluster branch June 2, 2019 07:40
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants