Pārlūkot izejas kodu

Merge pull request #6301 from mgugino-upstream-stage/project_cfg_facts

Automatic merge from submit-queue.

Remove openshift_facts project_cfg_facts
OpenShift Merge Robot 7 gadi atpakaļ
vecāks
revīzija
8f9f84b27c

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

@@ -498,34 +498,6 @@ def set_selectors(facts):
     return facts
 
 
-def set_project_cfg_facts_if_unset(facts):
-    """ Set Project Configuration facts if not already present in facts dict
-            dict:
-        Args:
-            facts (dict): existing facts
-        Returns:
-            dict: the facts dict updated with the generated Project Configuration
-            facts if they were not already present
-
-    """
-
-    config = {
-        'default_node_selector': '',
-        'project_request_message': '',
-        'project_request_template': '',
-        'mcs_allocator_range': 's0:/2',
-        'mcs_labels_per_project': 5,
-        'uid_allocator_range': '1000000000-1999999999/10000'
-    }
-
-    if 'master' in facts:
-        for key, value in config.items():
-            if key not in facts['master']:
-                facts['master'][key] = value
-
-    return facts
-
-
 def set_identity_providers_if_unset(facts):
     """ Set identity_providers fact if not already present in facts dict
 
@@ -1800,7 +1772,6 @@ class OpenShiftFacts(object):
         facts = migrate_oauth_template_facts(facts)
         facts['current_config'] = get_current_config(facts)
         facts = set_url_facts_if_unset(facts)
-        facts = set_project_cfg_facts_if_unset(facts)
         facts = set_selectors(facts)
         facts = set_identity_providers_if_unset(facts)
         facts = set_deployment_facts_if_unset(facts)

+ 6 - 0
roles/openshift_master/defaults/main.yml

@@ -16,6 +16,12 @@ 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
+osm_default_node_selector: ''
+osm_project_request_template: ''
+osm_mcs_allocator_range: 's0:/2'
+osm_mcs_labels_per_project: 5
+osm_uid_allocator_range: '1000000000-1999999999/10000'
+osm_project_request_message: ''
 
 openshift_node_ips: []
 r_openshift_master_clean_install: false

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

@@ -196,13 +196,13 @@ policyConfig:
   openshiftInfrastructureNamespace: openshift-infra
   openshiftSharedResourcesNamespace: openshift
 projectConfig:
-  defaultNodeSelector: "{{ openshift.master.default_node_selector }}"
-  projectRequestMessage: "{{ openshift.master.project_request_message }}"
-  projectRequestTemplate: "{{ openshift.master.project_request_template }}"
+  defaultNodeSelector: "{{ osm_default_node_selector }}"
+  projectRequestMessage: "{{ osm_project_request_message }}"
+  projectRequestTemplate: "{{ osm_project_request_template }}"
   securityAllocator:
-    mcsAllocatorRange: "{{ openshift.master.mcs_allocator_range }}"
-    mcsLabelsPerProject: {{ openshift.master.mcs_labels_per_project }}
-    uidAllocatorRange: "{{ openshift.master.uid_allocator_range  }}"
+    mcsAllocatorRange: "{{ osm_mcs_allocator_range }}"
+    mcsLabelsPerProject: {{ osm_mcs_labels_per_project }}
+    uidAllocatorRange: "{{ osm_uid_allocator_range }}"
 routingConfig:
   subdomain:  "{{ openshift_master_default_subdomain | default("") }}"
 serviceAccountConfig:

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

@@ -75,12 +75,6 @@
       sdn_cluster_network_cidr: "{{ osm_cluster_network_cidr | default(None) }}"
       sdn_host_subnet_length: "{{ osm_host_subnet_length | default(None) }}"
       custom_cors_origins: "{{ osm_custom_cors_origins | default(None) }}"
-      default_node_selector: "{{ osm_default_node_selector | default(None) }}"
-      project_request_message: "{{ osm_project_request_message | default(None) }}"
-      project_request_template: "{{ osm_project_request_template | default(None) }}"
-      mcs_allocator_range: "{{ osm_mcs_allocator_range | default(None) }}"
-      mcs_labels_per_project: "{{ osm_mcs_labels_per_project | default(None) }}"
-      uid_allocator_range: "{{ osm_uid_allocator_range | default(None) }}"
       registry_selector: "{{ openshift_registry_selector | default(None) }}"
       api_server_args: "{{ osm_api_server_args | default(None) }}"
       controller_args: "{{ osm_controller_args | default(None) }}"