Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Allow custom configuration for apiserver host #1951

Closed
wants to merge 5 commits into from
Closed

Allow custom configuration for apiserver host #1951

wants to merge 5 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 29, 2016

Currently your system uses the kubectl_util.DefaultClientConfig() to retrieve the IP for the api-server, which may not work outside GCE in customized setups.

This PR provides optional flags to use a non-default api-server. It uses the same flags and borrows code from the kubernetes/dashboard project:
https://github.com/kubernetes/dashboard/blob/master/src/app/backend/client/apiserverclient.go
https://github.com/kubernetes/dashboard/blob/master/src/app/backend/dashboard.go#L31


This change is Reviewable

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@ghost
Copy link
Author

ghost commented Oct 29, 2016

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@k8s-github-robot
Copy link

[CLA-PING] @doug-clarifai

Thanks for your pull request. It looks like this may be your first contribution to a CNCF open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://identity.linuxfoundation.org/projects/cncf to sign.

Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.


@k8s-github-robot k8s-github-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Oct 29, 2016
@ghost
Copy link
Author

ghost commented Oct 29, 2016

I signed it!

@k8s-github-robot k8s-github-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 29, 2016
clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
)

// Dashboard UI default values for client configs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Reference to Dashboard

@bprashanth
Copy link

Is your goal to point at an apiserver that kubectl doesn't know about? because even outside a kubecluster, we should be looking up the default kubeconfig context, and pulling out the apiserver from there, at least the last time i checked

@aledbf
Copy link
Contributor

aledbf commented Nov 30, 2016

@doug-clarifai this is not required. Please check this comment #1467 (comment)

@ghost
Copy link
Author

ghost commented Nov 30, 2016

@aledbf The comment you reference only allows a simple host name as an environment variable for the api server.

The goal of this change is to allow for more flexible configurations. kubernetes/dashboard added these flags to match kubectl and proxy: kubernetes/dashboard#1256 kubernetes/dashboard#905

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] The Following OWNERS Files Need Approval:

  • ingress

We suggest the following people:
cc @bprashanth
You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancelin a comment

@k8s-github-robot
Copy link

@doug-clarifai PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 7, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: doug-clarifai
We suggest the following additional approver: bprashanth

Assign the PR to them by writing /assign @bprashanth in a comment when ready.

No associated issue. Update pull-request body to add a reference to an issue, or get approval with /approve no-issue

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 29, 2017
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 28, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants