From 7e8e98dad2adde361c7ecc6e7b043429bed6d77a Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Thu, 1 Dec 2016 12:37:20 -0400 Subject: Fix metricsPublicURL only being set correctly on first master. Problem was caused by facts not being set for that master. To fix this patch cleans up the calculation of metricsPublicURL in general. Because this value is used in openshift_master to template into the master config file, we now define these facts more clearly in openshift_master_facts, and add a dependency on this to openshift_metrics. The calculation of default sub-domain is also changed to remove it from system facts (as neither of these are facts about the system) and instead use plain variables. --- roles/openshift_master/templates/master.yaml.v1.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'roles/openshift_master') diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2 index dc9226a5a..81546c829 100644 --- a/roles/openshift_master/templates/master.yaml.v1.j2 +++ b/roles/openshift_master/templates/master.yaml.v1.j2 @@ -15,8 +15,8 @@ assetConfig: {% if 'logging_public_url' in openshift.master %} loggingPublicURL: {{ openshift.master.logging_public_url }} {% endif %} -{% if 'metrics_public_url' in openshift.master %} - metricsPublicURL: {{ openshift.master.metrics_public_url }} +{% if openshift_hosted_metrics_deploy | default(false) | bool %} + metricsPublicURL: {{ openshift_hosted_metrics_public_url }} {% endif %} {% if 'extension_scripts' in openshift.master %} extensionScripts: {{ openshift.master.extension_scripts | to_padded_yaml(1, 2) }} @@ -202,7 +202,7 @@ projectConfig: mcsLabelsPerProject: {{ openshift.master.mcs_labels_per_project }} uidAllocatorRange: "{{ openshift.master.uid_allocator_range }}" routingConfig: - subdomain: "{{ openshift.master.default_subdomain | default("") }}" + subdomain: "{{ openshift_master_default_subdomain | default("") }}" serviceAccountConfig: limitSecretReferences: false managedNames: -- cgit v1.2.3