Browse Source

Merge pull request #544 from sdodson/serviceNetworkCIDR

Add serviceNetworkCIDR and SDN MTU config
Brenton Leanhardt 9 years ago
parent
commit
7d480fbab7

+ 4 - 0
roles/openshift_facts/library/openshift_facts.py

@@ -488,6 +488,10 @@ def set_sdn_facts_if_unset(facts):
         if 'sdn_host_subnet_length' not in facts['master']:
             facts['master']['sdn_host_subnet_length'] = '8'
 
+    if 'node' in facts:
+        if 'sdn_mtu' not in facts['node']:
+            facts['node']['sdn_mtu'] = '1450'
+
     return facts
 
 def format_url(use_ssl, hostname, port, path=''):

+ 2 - 0
roles/openshift_master/templates/master.yaml.v1.j2

@@ -88,6 +88,8 @@ networkConfig:
   clusterNetworkCIDR: {{ openshift.master.sdn_cluster_network_cidr }}
   hostSubnetLength: {{ openshift.master.sdn_host_subnet_length }}
   networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
+# serviceNetworkCIDR must match kubernetesMasterConfig.servicesSubnet
+  serviceNetworkCIDR: {{ openshift.master.portal_net }}
 {% include 'v1_partials/oauthConfig.j2' %}
 policyConfig:
   bootstrapPolicyFile: {{ openshift_master_policy }}

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

@@ -28,6 +28,7 @@
       debug_level: "{{ openshift_node_debug_level | default(openshift.common.debug_level) }}"
       portal_net: "{{ openshift_master_portal_net | default(None) }}"
       kubelet_args: "{{ openshift_node_kubelet_args | default(None) }}"
+      sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}"
 
 - name: Install Node package
   yum: pkg={{ openshift.common.service_type }}-node state=present

+ 6 - 1
roles/openshift_node/templates/node.yaml.v1.j2

@@ -13,6 +13,11 @@ kubeletArguments: {{ openshift.node.kubelet_args | to_json }}
 {% endif %}
 masterKubeConfig: system:node:{{ openshift.common.hostname }}.kubeconfig
 networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
+# networkConfig struct introduced in origin 1.0.6 and OSE 3.0.2 which
+# deprecates networkPluginName above. The two should match.
+networkConfig:
+   mtu: {{ openshift.node.sdn_mtu }}
+   networkPluginName: {{ openshift.common.sdn_network_plugin_name }}
 nodeName: {{ openshift.common.hostname }}
 podManifestConfig:
 servingInfo:
@@ -21,4 +26,4 @@ servingInfo:
   clientCA: ca.crt
   keyFile: server.key
 volumeDirectory: {{ openshift_data_dir }}/openshift.local.volumes
-{% include 'partials/kubeletArguments.j2' %}
+{% include 'partials/kubeletArguments.j2' %}