-
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 about node label management #268
Add example about node label management #268
Conversation
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.
Thanks for your contribution. Here are my comments. Also the pep8 check is failing that means there is a formatting issue with your code.
examples/add-node-label.py
Outdated
@@ -0,0 +1,20 @@ | |||
from pprint import pprint |
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.
Add copyright header please.
examples/add-node-label.py
Outdated
from kubernetes import client, config | ||
|
||
config.load_kube_config() | ||
client.configuration.debug = True |
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.
We don't need this in the example.
examples/remove-node-label.py
Outdated
@@ -0,0 +1,19 @@ | |||
from pprint import pprint |
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.
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.
5e43187
to
96f9b1b
Compare
I applied all the chances your proposed. |
c4402c0
to
553f91a
Compare
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>
553f91a
to
0a4b52a
Compare
Use select.poll() for exec on linux/darwin
Add example covering node label management as requested here.