瀏覽代碼

Make node start options configurable

Thanks to this, the node startup can be customized.

Change-Id: Ifb93bf892d7de52a575b8d0231328d44f733d0aa
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
Antoni Segura Puimedon 7 年之前
父節點
當前提交
b58a3cec05
共有 2 個文件被更改,包括 12 次插入5 次删除
  1. 11 4
      roles/openshift_node/README.md
  2. 1 1
      roles/openshift_node/tasks/config/configure-node-settings.yml

+ 11 - 4
roles/openshift_node/README.md

@@ -15,10 +15,17 @@ Role Variables
 --------------
 --------------
 From this role:
 From this role:
 
 
-| Name                       | Default value         |                                                          |
-|----------------------------|-----------------------|----------------------------------------------------------|
-| oreg_url                   | UNDEF (Optional)      | Default docker registry to use                           |
-| oreg_url_node              | UNDEF (Optional)      | Default docker registry to use, specifically on the node |
+| Name                         | Default value         |                                                          |
+|------------------------------|-----------------------|----------------------------------------------------------|
+| openshift_node_start_options | UNDEF (Optional)      | Options to pass to node start cmdline                    |
+| oreg_url                     | UNDEF (Optional)      | Default docker registry to use                           |
+| oreg_url_node                | UNDEF (Optional)      | Default docker registry to use, specifically on the node |
+
+openshift_node_start_options can be used for passing any start node option, e.g.:
+
+--enable=kubelet,plugins
+
+Which would have a node running without kube-proxy and dns.
 
 
 Dependencies
 Dependencies
 ------------
 ------------

+ 1 - 1
roles/openshift_node/tasks/config/configure-node-settings.yml

@@ -7,7 +7,7 @@
     create: true
     create: true
   with_items:
   with_items:
   - regex: '^OPTIONS='
   - regex: '^OPTIONS='
-    line: "OPTIONS=--loglevel={{ openshift_node_debug_level }}"
+    line: "OPTIONS=--loglevel={{ openshift_node_debug_level }} {{ openshift_node_start_options | default('') }}"
   - regex: '^CONFIG_FILE='
   - regex: '^CONFIG_FILE='
     line: "CONFIG_FILE={{ openshift.common.config_base }}/node/node-config.yaml"
     line: "CONFIG_FILE={{ openshift.common.config_base }}/node/node-config.yaml"
   - regex: '^IMAGE_VERSION='
   - regex: '^IMAGE_VERSION='