Browse Source

* Make portal_net configurable when wetting up the nodes OpenShift Registry

Jhon Honce 9 years ago
parent
commit
ccf7dfedb6

+ 1 - 1
roles/openshift_facts/library/openshift_facts.py

@@ -705,7 +705,7 @@ class OpenShiftFacts(object):
             defaults['master'] = master
 
         if 'node' in roles:
-            node = dict(pod_cidr='', labels={}, annotations={})
+            node = dict(pod_cidr='', labels={}, annotations={}, portal_net='172.30.0.0/16')
             node['resources_cpu'] = self.system_facts['processor_cores']
             node['resources_memory'] = int(
                 int(self.system_facts['memtotal_mb']) * 1024 * 1024 * 0.75

+ 2 - 1
roles/openshift_node/tasks/main.yml

@@ -20,6 +20,7 @@
       annotations: "{{ openshift_node_annotations | default(none) }}"
       registry_url: "{{ oreg_url | default(none) }}"
       debug_level: "{{ openshift_node_debug_level | default(openshift.common.debug_level) }}"
+      portal_net: "{{ openshift_master_portal_net | default(None) }}"
 
 - name: Install OpenShift Node package
   yum: pkg=openshift-node state=present
@@ -64,7 +65,7 @@
   lineinfile:
     dest: /etc/sysconfig/docker
     regexp: '^OPTIONS=.*'
-    line: "OPTIONS='--insecure-registry=172.30.0.0/16 --selinux-enabled'"
+    line: "OPTIONS='--insecure-registry={{ openshift.node.portal_net }} --selinux-enabled'"
   when: docker_check.stat.isreg
 
 - name: Allow NFS access for VMs