summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/templates
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-03-30 09:31:11 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-04-01 13:33:21 -0300
commit6003856b95031aa8e0c31977e9485ff3d842810e (patch)
treeb53e63ab1226dcf62a0422ee989fcfe30427a116 /roles/openshift_master/templates
parent89db887bd536156421fbc701c5d1b46656070347 (diff)
downloadopenshift-6003856b95031aa8e0c31977e9485ff3d842810e.tar.gz
openshift-6003856b95031aa8e0c31977e9485ff3d842810e.tar.bz2
openshift-6003856b95031aa8e0c31977e9485ff3d842810e.tar.xz
openshift-6003856b95031aa8e0c31977e9485ff3d842810e.zip
Add support for configuring oauth templates.
Allow users who wish to deploy configs with ansible to define templates for oauth screens, and control the alwaysShowProviderSelection setting. There are currently three supported oauth templates, and we have a pre-existing 'oauth_template' variable, but it is assumed to mean you are controlling the 'login' screen, and this is the only one you can configure. To work around this, supporting all current and future templates, introduce a pluralized variable 'oauth_templates', which contains a JSON dict allowing the admin to control any template they wish. If both new and old variables are defined, the old one is ignored. (and can be considered deprecated) Internally the old value will be converted to the new dict, so the template just references one value. Example: openshift_master_oauth_always_show_provider_selection=true openshift_master_oauth_templates={"providerSelection": "provider-selection.html", "error": "oauth-error.html"} Yeilds: oauthConfig: alwaysShowProviderSelection: true templates: error: oauth-error.html providerSelection: provider-selection.html
Diffstat (limited to 'roles/openshift_master/templates')
-rw-r--r--roles/openshift_master/templates/master.yaml.v1.j28
1 files changed, 5 insertions, 3 deletions
diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2
index 618ad8744..e89fdc0ce 100644
--- a/roles/openshift_master/templates/master.yaml.v1.j2
+++ b/roles/openshift_master/templates/master.yaml.v1.j2
@@ -137,9 +137,11 @@ networkConfig:
# serviceNetworkCIDR must match kubernetesMasterConfig.servicesSubnet
serviceNetworkCIDR: {{ openshift.master.portal_net }}
oauthConfig:
-{% if 'oauth_template' in openshift.master %}
- templates:
- login: {{ openshift.master.oauth_template }}
+{% if 'oauth_always_show_provider_selection' in openshift.master %}
+ alwaysShowProviderSelection: {{ openshift.master.oauth_always_show_provider_selection }}
+{% endif %}
+{% if 'oauth_templates' in openshift.master %}
+ templates:{{ openshift.master.oauth_templates | to_padded_yaml(level=2) }}
{% endif %}
assetPublicURL: {{ openshift.master.public_console_url }}/
grantConfig: