-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add example for remote cluster without kube client on server #446
Conversation
examples/remote_cluster.py
Outdated
configuration.api_key = {"authorization": "Bearer " + aToken} | ||
|
||
# Use our configuration | ||
client.Configuration.set_default(configuration) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest you an ApiClient and pass it to client.CoreV1Api instead of changing the default.
Thanks for the contribution. It looks good except one comment. |
Sorry It took me so long to review. I updated and tested (with a cluster on GKE) following the feedback. |
thanks for showing this in your blog, I think basic auth should be included as you explained gere https://djynet.net/?p=918 |
examples/remote_cluster.py
Outdated
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This example demonstrate communication with a remove Kube cluster from a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove --> remote
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx !
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
examples/remote_cluster.py
Outdated
@@ -0,0 +1,58 @@ | |||
# Copyright 2016 The Kubernetes Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May look trivial, but 2016->2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix. Thx. Now we just need to hope it is merge before 2019 ;)
/lgtm |
@micw523: changing LGTM is restricted to assignees, and only kubernetes-client/python repo collaborators may be assigned issues. In response to this:
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. |
/lgtm Thanks for the PR and reminding ;) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: charly37, roycaihw 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 |
Propose a new example to demonstrate communication from a server that do not have kube client installed. It show how to create a config object and also setup a barer token to authenticate.
The idea come from a recent issue tracker #430