summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorWesley Hearn <wesley.s.hearn@gmail.com>2015-08-12 23:06:34 -0400
committerWesley Hearn <wesley.s.hearn@gmail.com>2015-08-12 23:06:34 -0400
commitcd989f62709db9f858205420869b9a665cc609a1 (patch)
tree436e53b269a8a4ab4f2751a1b16052350a5cc5e6 /roles
parentd307f715764164c8f543d57486718f95b1987875 (diff)
parent7a12b210856a2abefb2a7d70448975c7f2ce14af (diff)
downloadopenshift-cd989f62709db9f858205420869b9a665cc609a1.tar.gz
openshift-cd989f62709db9f858205420869b9a665cc609a1.tar.bz2
openshift-cd989f62709db9f858205420869b9a665cc609a1.tar.xz
openshift-cd989f62709db9f858205420869b9a665cc609a1.zip
Merge pull request #416 from spinolacastro/fix_labels
Fix node labeling. Issue #305
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_manage_node/tasks/main.yml8
-rw-r--r--roles/openshift_node/README.md12
2 files changed, 20 insertions, 0 deletions
diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml
index d17f3f532..472d63efe 100644
--- a/roles/openshift_manage_node/tasks/main.yml
+++ b/roles/openshift_manage_node/tasks/main.yml
@@ -16,3 +16,11 @@
command: >
{{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=true
with_items: openshift_scheduleable_nodes
+
+- name: Label nodes
+ command: >
+ {{ openshift.common.client_binary }} label --overwrite node {{ item }} {{ hostvars[item]['openshift_node_labels'] | oo_combine_dict }}
+ with_items:
+ - "{{ openshift_nodes }}"
+ when:
+ "'openshift_node_labels' in hostvars[item]"
diff --git a/roles/openshift_node/README.md b/roles/openshift_node/README.md
index 5edb3b8dd..300e6b495 100644
--- a/roles/openshift_node/README.md
+++ b/roles/openshift_node/README.md
@@ -34,6 +34,18 @@ openshift_common
Example Playbook
----------------
+Notes
+-----
+
+Currently we support re-labeling nodes but we don't re-schedule running pods nor remove existing labels. That means you will have to trigger the re-schedulling manually. To re-schedule your pods, just follow the steps below:
+
+```
+oadm manage-node --schedulable=false ${NODE}
+oadm manage-node --evacuate ${NODE}
+oadm manage-node --schedulable=true ${NODE}
+````
+
+
TODO
License