summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-03-09 16:43:51 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-03-09 16:43:51 -0400
commitabe9dcfcdd29bb20c73a1d3735eb1d136b602ce4 (patch)
treed03e40e26145d0e9e6beefa0b10dbd1554baa250 /roles
parent3c9ecdf394c796e6b25d8703450e7001d9ac9ab4 (diff)
parentaa600e99b0d55c38b58e61bac11a4de682780383 (diff)
downloadopenshift-abe9dcfcdd29bb20c73a1d3735eb1d136b602ce4.tar.gz
openshift-abe9dcfcdd29bb20c73a1d3735eb1d136b602ce4.tar.bz2
openshift-abe9dcfcdd29bb20c73a1d3735eb1d136b602ce4.tar.xz
openshift-abe9dcfcdd29bb20c73a1d3735eb1d136b602ce4.zip
Merge pull request #110 from detiber/nodeResources
Allow for overriding node resources
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_node/README.md1
-rw-r--r--roles/openshift_node/defaults/main.yml4
-rw-r--r--roles/openshift_node/tasks/main.yml3
3 files changed, 6 insertions, 2 deletions
diff --git a/roles/openshift_node/README.md b/roles/openshift_node/README.md
index 87913a0d5..9210bab16 100644
--- a/roles/openshift_node/README.md
+++ b/roles/openshift_node/README.md
@@ -21,6 +21,7 @@ From this role:
| openshift_master_public_ips | UNDEF (Required) | List of the public IPs for the openhift-master hosts |
| openshift_master_ips | UNDEF (Required) | List of IP addresses for the openshift-master hosts to be used for node -> master communication |
| openshift_registry_url | UNDEF (Optional) | Default docker registry to use |
+| openshift_node_resources | { capacity: { cpu: , memory: } } | Resource specification for this node, cpu is the number of CPUs to advertise and memory is the amount of memory in bytes to advertise. Default values chosen when not set are the number of logical CPUs for the host and 75% of total system memory |
From openshift_common:
| Name | Default Value | |
diff --git a/roles/openshift_node/defaults/main.yml b/roles/openshift_node/defaults/main.yml
index 6dc73a96e..c45524f16 100644
--- a/roles/openshift_node/defaults/main.yml
+++ b/roles/openshift_node/defaults/main.yml
@@ -4,3 +4,7 @@ openshift_node_debug_level: "{{ openshift_debug_level | default(0) }}"
os_firewall_allow:
- service: OpenShift kubelet
port: 10250/tcp
+openshift_node_resources:
+ capacity:
+ cpu:
+ memory:
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index df2722a94..6721c7401 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -72,8 +72,7 @@
args:
creates: /root/.kube/.kubeconfig
-# TODO: expose openshift_register_node options to allow for overriding the
-# defaults.
- name: Register node (if not already registered)
openshift_register_node:
name: "{{ openshift_hostname }}"
+ resources: "{{ openshift_node_resources }}"