moving conditionals into configmap-etc
This commit is contained in:
parent
89696cccb9
commit
8c355ac65c
@ -20,14 +20,38 @@ metadata:
|
||||
name: keystone-etc
|
||||
data:
|
||||
keystone.conf: |+
|
||||
{{ if .Values.conf.keystone.override -}}
|
||||
{{ .Values.conf.keystone.override }}
|
||||
{{- else -}}
|
||||
{{- if .Values.conf.keystone.prefix -}}
|
||||
{{ .Values.conf.keystone.prefix }}
|
||||
{{- end }}
|
||||
{{ tuple "etc/_keystone.conf.tpl" . | include "helm-toolkit.template" | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.conf.keystone.append -}}
|
||||
{{ .Values.conf.keystone.append }}
|
||||
{{- end }}
|
||||
keystone-paste.ini: |+
|
||||
{{ if .Values.conf.paste.override -}}
|
||||
{{ .Values.conf.paste.override }}
|
||||
{{- else -}}
|
||||
{{- if .Values.conf.paste.prefix -}}
|
||||
{{ .Values.conf.paste.prefix }}
|
||||
{{- end }}
|
||||
{{ tuple "etc/_keystone-paste.ini.tpl" . | include "helm-toolkit.template" | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.conf.paste.append -}}
|
||||
{{ .Values.conf.paste.append }}
|
||||
{{- end }}
|
||||
policy.json: |+
|
||||
{{ if .Values.conf.policy.override -}}
|
||||
{{ .Values.conf.policy.override }}
|
||||
{{- else -}}
|
||||
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }}
|
||||
{{- end -}}
|
||||
mpm_event.conf: |+
|
||||
{{ tuple "etc/_mpm_event.conf.tpl" . | include "helm-toolkit.template" | indent 4 }}
|
||||
wsgi-keystone.conf: |+
|
||||
{{ tuple "etc/_wsgi-keystone.conf.tpl" . | include "helm-toolkit.template" | indent 4 }}
|
||||
policy.json: |+
|
||||
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }}
|
||||
keystone-paste.ini: |+
|
||||
{{ tuple "etc/_keystone-paste.ini.tpl" . | include "helm-toolkit.template" | indent 4 }}
|
||||
sso_callback_template.html: |+
|
||||
{{ tuple "etc/_sso_callback_template.html.tpl" . | include "helm-toolkit.template" | indent 4 }}
|
||||
|
@ -12,14 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if empty .Values.conf.paste.override -}}
|
||||
{{ include "keystone.conf.paste" .Values.conf.paste }}
|
||||
{{- else -}}
|
||||
{{ .Values.conf.paste.override }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "keystone.conf.paste" -}}
|
||||
|
||||
# Keystone PasteDeploy configuration file.
|
||||
|
||||
[filter:debug]
|
||||
@ -113,10 +105,4 @@ use = egg:Paste#urlmap
|
||||
use = egg:Paste#urlmap
|
||||
/v2.0 = admin_api
|
||||
/v3 = api_v3
|
||||
/ = admin_version_api
|
||||
|
||||
{{ if .append }}
|
||||
{{ .append }}
|
||||
{{ end }}
|
||||
|
||||
{{- end -}}
|
||||
/ = admin_version_api
|
@ -1,3 +1,4 @@
|
||||
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -12,14 +13,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if empty .Values.conf.keystone.override -}}
|
||||
{{ include "keystone.conf.keystone_values_skeleton" .Values.conf.keystone | trunc 0 }}
|
||||
{{ include "keystone.conf.keystone" .Values.conf.keystone }}
|
||||
{{- else -}}
|
||||
{{ .Values.conf.keystone.override }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "keystone.conf.keystone_values_skeleton" -}}
|
||||
|
||||
{{- if not .default -}}{{- set . "default" dict -}}{{- end -}}
|
||||
{{- if not .default.keystone -}}{{- set .default "keystone" dict -}}{{- end -}}
|
||||
{{- if not .default.oslo -}}{{- set .default "oslo" dict -}}{{- end -}}
|
||||
@ -124,10 +123,11 @@
|
||||
{{- if not .tokenless_auth.keystone -}}{{- set .tokenless_auth "keystone" dict -}}{{- end -}}
|
||||
{{- if not .trust -}}{{- set . "trust" dict -}}{{- end -}}
|
||||
{{- if not .trust.keystone -}}{{- set .trust "keystone" dict -}}{{- end -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
{{- define "keystone.conf.keystone" }}
|
||||
|
||||
{{- define "keystone.conf.keystone" -}}
|
||||
|
||||
[DEFAULT]
|
||||
|
||||
@ -3678,7 +3678,5 @@
|
||||
# from .trust.keystone.driver
|
||||
{{ if not .trust.keystone.driver }}#{{ end }}driver = {{ .trust.keystone.driver | default "sql" }}
|
||||
|
||||
{{ if .append }}
|
||||
{{ .append }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -1,11 +1,3 @@
|
||||
{{- if empty .Values.conf.policy.override -}}
|
||||
{{ include "keystone.conf.policy" .Values.conf.policy }}
|
||||
{{- else -}}
|
||||
{{ .Values.conf.policy.override }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "keystone.conf.policy" -}}
|
||||
|
||||
{
|
||||
"admin_required": "role:admin or is_admin:1",
|
||||
"service_role": "role:service",
|
||||
@ -203,11 +195,3 @@
|
||||
"identity:update_domain_config": "rule:admin_required",
|
||||
"identity:delete_domain_config": "rule:admin_required",
|
||||
"identity:get_domain_config_default": "rule:admin_required"
|
||||
{{- if .append -}}
|
||||
,
|
||||
{{ .append | indent 4 }}
|
||||
{{ end }}
|
||||
|
||||
}
|
||||
|
||||
{{ end -}}
|
||||
|
Loading…
Reference in New Issue
Block a user