Browse Source

Remove dns_port fact

Simply dns_port variable by remove from openshift_facts.
Michael Gugino 7 years ago
parent
commit
602310de78

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

@@ -498,21 +498,6 @@ def set_selectors(facts):
     return facts
 
 
-def set_dnsmasq_facts_if_unset(facts):
-    """ Set dnsmasq facts if not already present in facts
-    Args:
-        facts (dict) existing facts
-    Returns:
-        facts (dict) updated facts with values set if not previously set
-    """
-
-    if 'common' in facts:
-        if 'master' in facts and 'dns_port' not in facts['master']:
-            facts['master']['dns_port'] = 8053
-
-    return facts
-
-
 def set_project_cfg_facts_if_unset(facts):
     """ Set Project Configuration facts if not already present in facts dict
             dict:
@@ -1825,7 +1810,6 @@ class OpenShiftFacts(object):
         facts = build_controller_args(facts)
         facts = build_api_server_args(facts)
         facts = set_version_facts_if_unset(facts)
-        facts = set_dnsmasq_facts_if_unset(facts)
         facts = set_aggregate_facts(facts)
         facts = set_etcd_facts_if_unset(facts)
         facts = set_proxy_facts(facts)

+ 4 - 2
roles/openshift_master/defaults/main.yml

@@ -15,6 +15,8 @@ system_images_registry: "{{ system_images_registry_dict[openshift_deployment_typ
 
 l_is_master_system_container: "{{ (openshift_use_master_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
 
+openshift_master_dns_port: 8053
+
 openshift_node_ips: []
 r_openshift_master_clean_install: false
 r_openshift_master_etcd3_storage: false
@@ -26,9 +28,9 @@ default_r_openshift_master_os_firewall_allow:
 - service: api controllers https
   port: "{{ openshift.master.controllers_port }}/tcp"
 - service: skydns tcp
-  port: "{{ openshift.master.dns_port }}/tcp"
+  port: "{{ openshift_master_dns_port }}/tcp"
 - service: skydns udp
-  port: "{{ openshift.master.dns_port }}/udp"
+  port: "{{ openshift_master_dns_port }}/udp"
 - service: etcd embedded
   port: 4001/tcp
   cond: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"

+ 1 - 1
roles/openshift_master/templates/master.yaml.v1.j2

@@ -65,7 +65,7 @@ disabledFeatures: {{ openshift.master.disabled_features | to_json }}
 {% endif %}
 {% if openshift.master.embedded_dns | bool %}
 dnsConfig:
-  bindAddress: {{ openshift.master.bind_addr }}:{{ openshift.master.dns_port }}
+  bindAddress: {{ openshift.master.bind_addr }}:{{ openshift_master_dns_port }}
   bindNetwork: tcp4
 {% endif %}
 etcdClientInfo:

+ 0 - 2
roles/openshift_master_facts/tasks/main.yml

@@ -55,8 +55,6 @@
       embedded_etcd: "{{ openshift_master_embedded_etcd | default(None) }}"
       embedded_kube: "{{ openshift_master_embedded_kube | default(None) }}"
       embedded_dns: "{{ openshift_master_embedded_dns | default(None) }}"
-      # defaults to 8053 when using dnsmasq in 1.2/3.2
-      dns_port: "{{ openshift_master_dns_port | default(None) }}"
       bind_addr: "{{ openshift_master_bind_addr | default(None) }}"
       pod_eviction_timeout: "{{ openshift_master_pod_eviction_timeout | default(None) }}"
       session_max_seconds: "{{ openshift_master_session_max_seconds | default(None) }}"