Skip to content

Add example about node label management#268

Merged
mbohlool merged 1 commit into
kubernetes-client:masterfrom
flavio:manage-node-labels-example
Jul 5, 2017
Merged

Add example about node label management#268
mbohlool merged 1 commit into
kubernetes-client:masterfrom
flavio:manage-node-labels-example

Conversation

@flavio

@flavio flavio commented Jun 23, 2017

Copy link
Copy Markdown
Contributor

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

@mbohlool mbohlool left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread examples/add-node-label.py Outdated
@@ -0,0 +1,20 @@
from pprint import pprint

Copy link
Copy Markdown
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.

Comment thread examples/add-node-label.py Outdated
from kubernetes import client, config

config.load_kube_config()
client.configuration.debug = True

Copy link
Copy Markdown
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.

Comment thread examples/remove-node-label.py Outdated
@@ -0,0 +1,19 @@
from pprint import pprint

Copy link
Copy Markdown
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

flavio commented Jul 4, 2017

Copy link
Copy Markdown
Contributor Author

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

mbohlool commented Jul 5, 2017

Copy link
Copy Markdown
Contributor

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.

3 participants