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

Add example about node label management #268

Merged

Conversation

flavio
Copy link
Contributor

@flavio flavio commented Jun 23, 2017

Add example covering node label management as requested here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 23, 2017
Copy link
Contributor

@mbohlool mbohlool left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. Here are my comments. Also the pep8 check is failing that means there is a formatting issue with your code.

@@ -0,0 +1,20 @@
from pprint import pprint
Copy link
Contributor

Choose a reason for hiding this comment

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

Add copyright header please.

from kubernetes import client, config

config.load_kube_config()
client.configuration.debug = True
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need this in the example.

@@ -0,0 +1,19 @@
from pprint import pprint
Copy link
Contributor

Choose a reason for hiding this comment

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

We can add this to the previous example. right? in between we can also read the node and check to see if the label is there.

@flavio flavio force-pushed the manage-node-labels-example branch 2 times, most recently from 5e43187 to 96f9b1b Compare July 4, 2017 10:55
@flavio
Copy link
Contributor Author

flavio commented Jul 4, 2017

I applied all the chances your proposed.

@flavio flavio force-pushed the manage-node-labels-example branch 2 times, most recently from c4402c0 to 553f91a Compare July 4, 2017 11:01
@mbohlool
Copy link
Contributor

mbohlool commented Jul 5, 2017

I think it is good to merge. Please fix pep8 check, more info here: https://travis-ci.org/kubernetes-incubator/client-python/jobs/249944871

Thanks.

Show how to add/remove/change node labels.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
@flavio flavio force-pushed the manage-node-labels-example branch from 553f91a to 0a4b52a Compare July 5, 2017 10:53
@mbohlool mbohlool merged commit 3595278 into kubernetes-client:master Jul 5, 2017
@flavio flavio deleted the manage-node-labels-example branch July 6, 2017 07:38
yliaog pushed a commit to yliaog/client-python that referenced this pull request Jan 8, 2022
Use select.poll() for exec on linux/darwin
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants