Browse Source

Merge pull request #110 from detiber/nodeResources

Allow for overriding node resources
Thomas Wiest 10 years ago
parent
commit
abe9dcfcdd

+ 1 - 0
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      |                     | 

+ 4 - 0
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:

+ 1 - 2
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 }}"