Browse Source

Merge pull request #6949 from vrutkovs/schedulable-masters

Automatic merge from submit-queue.

Make masters schedulable by default

Fixes #6930
OpenShift Merge Robot 7 years ago
parent
commit
22462aa170

+ 1 - 1
.papr.inventory

@@ -22,6 +22,6 @@ ocp-master
 ocp-master
 
 [nodes]
-ocp-master openshift_schedulable=false
+ocp-master openshift_schedulable=true
 ocp-node1  openshift_node_labels="{'region':'infra'}"
 ocp-node2  openshift_node_labels="{'region':'infra'}"

+ 2 - 3
inventory/hosts.example

@@ -1117,10 +1117,9 @@ ose3-etcd[1:3]-ansible.test.example.com
 ose3-lb-ansible.test.example.com containerized=false
 
 # NOTE: Currently we require that masters be part of the SDN which requires that they also be nodes
-# However, in order to ensure that your masters are not burdened with running pods you should
-# make them unschedulable by adding openshift_schedulable=False any node that's also a master.
 [nodes]
-ose3-master[1:3]-ansible.test.example.com
+# masters should be schedulable to run web console pods
+ose3-master[1:3]-ansible.test.example.com openshift_schedulable=True
 ose3-node[1:2]-ansible.test.example.com openshift_node_labels="{'region': 'primary', 'zone': 'default'}"
 
 [nfs]

+ 2 - 1
inventory/hosts.glusterfs.external.example

@@ -35,7 +35,8 @@ openshift_storage_glusterfs_heketi_url=172.0.0.1
 master
 
 [nodes]
-master  openshift_schedulable=False
+# masters should be schedulable to run web console pods
+master  openshift_schedulable=True
 node0   openshift_schedulable=True
 node1   openshift_schedulable=True
 node2   openshift_schedulable=True

+ 2 - 1
inventory/hosts.glusterfs.mixed.example

@@ -38,7 +38,8 @@ openshift_storage_glusterfs_heketi_ssh_keyfile=/root/id_rsa
 master
 
 [nodes]
-master  openshift_schedulable=False
+# masters should be schedulable to run web console pods
+master  openshift_schedulable=True
 node0   openshift_schedulable=True
 node1   openshift_schedulable=True
 node2   openshift_schedulable=True

+ 2 - 1
inventory/hosts.glusterfs.native.example

@@ -28,7 +28,8 @@ openshift_deployment_type=origin
 master
 
 [nodes]
-master  openshift_schedulable=False
+# masters should be schedulable to run web console pods
+master  openshift_schedulable=True
 # A hosted registry, by default, will only be deployed on nodes labeled
 # "region=infra".
 node0   openshift_schedulable=True

+ 2 - 1
inventory/hosts.glusterfs.registry-only.example

@@ -34,7 +34,8 @@ openshift_hosted_registry_storage_kind=glusterfs
 master
 
 [nodes]
-master  openshift_schedulable=False
+# masters should be schedulable to run web console pods
+master  openshift_schedulable=True
 # A hosted registry, by default, will only be deployed on nodes labeled
 # "region=infra".
 node0   openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True

+ 2 - 1
inventory/hosts.glusterfs.storage-and-registry.example

@@ -35,7 +35,8 @@ openshift_hosted_registry_storage_kind=glusterfs
 master
 
 [nodes]
-master  openshift_schedulable=False
+# masters should be schedulable to run web console pods
+master  openshift_schedulable=True
 # It is recommended to not use a single cluster for both general and registry
 # storage, so two three-node clusters will be required.
 node0   openshift_schedulable=True

+ 0 - 4
roles/openshift_manage_node/defaults/main.yml

@@ -1,9 +1,5 @@
 ---
 # openshift_manage_node_is_master is set at the play level.
 openshift_manage_node_is_master: False
-
-# Default is to be schedulable except for master nodes.
-l_openshift_manage_schedulable: "{{ openshift_schedulable | default(not openshift_manage_node_is_master) }}"
-
 openshift_master_node_labels:
   node-role.kubernetes.io/master: 'true'

+ 2 - 2
roles/openshift_manage_node/tasks/config.yml

@@ -2,7 +2,7 @@
 - name: Set node schedulability
   oc_adm_manage_node:
     node: "{{ openshift.node.nodename | lower }}"
-    schedulable: "{{ 'true' if l_openshift_manage_schedulable | bool else 'false' }}"
+    schedulable: "{{ 'true' if openshift_schedulable | default(true) | bool else 'false' }}"
   retries: 10
   delay: 5
   register: node_schedulable
@@ -23,5 +23,5 @@
   delegate_to: "{{ openshift_master_host }}"
   vars:
     l_node_labels: "{{ openshift_node_labels | default({}) }}"
-    l_master_labels: "{{ ('oo_masters_to_config' in group_names) | ternary(openshift_master_node_labels, {}) }}"
+    l_master_labels: "{{ openshift_manage_node_is_master | ternary(openshift_master_node_labels, {}) }}"
     l_all_labels: "{{ l_node_labels | combine(l_master_labels) }}"