Helm-Toolkit: Configmap templater

This PS adds a configmap teplater helper to helm-toolkit. It makes it
simpler to write consistent charts that supports over-riding of all
values.

Change-Id: I9a587999859ea02802485eb25a3f0ebec8c712a8
This commit is contained in:
Pete Birley 2017-08-23 07:13:20 -05:00
parent ddc3ca4b23
commit 1fd7f66783
14 changed files with 104 additions and 486 deletions

View File

@ -70,47 +70,13 @@ metadata:
name: barbican-etc
data:
barbican.conf: |+
{{ if .Values.conf.barbican.override -}}
{{ .Values.conf.barbican.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.barbican.prefix -}}
{{ .Values.conf.barbican.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_barbican.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.barbican.append -}}
{{ .Values.conf.barbican.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.barbican "etc/_barbican.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
barbican-api-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_barbican-api-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste "etc/_barbican-api-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
api_audit_map.conf: |+
{{ if .Values.conf.audit_map.override -}}
{{ .Values.conf.audit_map.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.audit_map.prefix -}}
{{ .Values.conf.audit_map.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_api_audit_map.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.audit_map.append -}}
{{ .Values.conf.audit_map.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.audit_map "etc/_api_audit_map.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- tuple .Values.conf.override "etc/_policy.json.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
barbican-api.ini: |+
{{ tuple "etc/_barbican-api.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- tuple .Values.conf.barbican_api "etc/_barbican-api.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}

View File

@ -177,6 +177,9 @@ conf:
audit_map:
override:
append:
barbican_api:
override:
append:
barbican:
override:
append:

View File

@ -70,29 +70,9 @@ metadata:
name: cinder-etc
data:
rally_tests.yaml: |+
{{ if .Values.conf.rally_tests.override -}}
{{ .Values.conf.rally_tests.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.rally_tests.prefix -}}
{{ .Values.conf.rally_tests.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.rally_tests.append -}}
{{ .Values.conf.rally_tests.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.rally_tests "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
cinder.conf: |+
{{ if .Values.conf.cinder.override -}}
{{ .Values.conf.cinder.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.cinder.prefix -}}
{{ .Values.conf.cinder.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_cinder.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.cinder.append -}}
{{ .Values.conf.cinder.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.cinder "etc/_cinder.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
backends.conf: |+
{{ if .Values.conf.backends.override -}}
{{ .Values.conf.backends.override | indent 4 }}
@ -106,33 +86,9 @@ data:
{{ .Values.conf.backends.append | indent 4 }}
{{- end }}
rootwrap.conf: |+
{{ if .Values.conf.rootwrap.override -}}
{{ .Values.conf.rootwrap.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.rootwrap.prefix -}}
{{ .Values.conf.rootwrap.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_rootwrap.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.rootwrap.append -}}
{{ .Values.conf.rootwrap.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.rootwrap "etc/_rootwrap.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
api-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- tuple .Values.conf.policy "etc/_policy.json.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}

View File

@ -117,69 +117,15 @@ metadata:
name: glance-etc
data:
rally_tests.yaml: |+
{{ if .Values.conf.rally_tests.override -}}
{{ .Values.conf.rally_tests.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.rally_tests.prefix -}}
{{ .Values.conf.rally_tests.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.rally_tests.append -}}
{{ .Values.conf.rally_tests.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.rally_tests "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
glance-api.conf: |+
{{ if .Values.conf.glance.override -}}
{{ .Values.conf.glance.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.glance.prefix -}}
{{ .Values.conf.glance.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_glance-api.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.glance.append -}}
{{ .Values.conf.glance.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.glance "etc/_glance-api.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
glance-api-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_glance-api-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste "etc/_glance-api-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
glance-registry.conf: |+
{{ if .Values.conf.glance_registry.override -}}
{{ .Values.conf.glance_registry.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.glance_registry.prefix -}}
{{ .Values.conf.glance_registry.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_glance-registry.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.glance_registry.append -}}
{{ .Values.conf.glance_registry.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.glance_registry "etc/_glance-registry.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
glance-registry-paste.ini: |+
{{ if .Values.conf.paste_registry.override -}}
{{ .Values.conf.paste_registry.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste_registry.prefix -}}
{{ .Values.conf.paste_registry.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_glance-registry-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste_registry.append -}}
{{ .Values.conf.paste_registry.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste_registry "etc/_glance-registry-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- tuple .Values.conf.policy "etc/_policy.json.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}

View File

@ -115,33 +115,9 @@ metadata:
name: heat-etc
data:
heat.conf: |+
{{ if .Values.conf.heat.override -}}
{{ .Values.conf.heat.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.heat.prefix -}}
{{ .Values.conf.heat.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_heat.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.heat.append -}}
{{ .Values.conf.heat.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.heat "etc/_heat.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
api-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- tuple .Values.conf.policy "etc/_policy.json.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}

View File

@ -0,0 +1,32 @@
{{/*
Copyright 2017 The Openstack-Helm Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "helm-toolkit.utils.configmap_templater" }}
{{- $keyRoot := index . 0 -}}
{{- $configTemplate := index . 1 -}}
{{- $context := index . 2 -}}
{{ if $keyRoot.override -}}
{{ $keyRoot.override | indent 4 }}
{{- else -}}
{{- if $keyRoot.prefix -}}
{{ $keyRoot.prefix | indent 4 }}
{{- end }}
{{ tuple $configTemplate $context | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if $keyRoot.append -}}
{{ $keyRoot.append | indent 4 }}
{{- end }}
{{- end -}}

View File

@ -38,51 +38,17 @@ metadata:
name: keystone-etc
data:
rally_tests.yaml: |+
{{ if .Values.conf.rally_tests.override -}}
{{ .Values.conf.rally_tests.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.rally_tests.prefix -}}
{{ .Values.conf.rally_tests.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.rally_tests.append -}}
{{ .Values.conf.rally_tests.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.rally_tests "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
keystone.conf: |+
{{ if .Values.conf.keystone.override -}}
{{ .Values.conf.keystone.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.keystone.prefix -}}
{{ .Values.conf.keystone.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_keystone.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.keystone.append -}}
{{ .Values.conf.keystone.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.keystone "etc/_keystone.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
keystone-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_keystone-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste "etc/_keystone-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- tuple .Values.conf.policy "etc/_policy.json.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
mpm_event.conf: |+
{{ tuple "etc/_mpm_event.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- tuple .Values.conf.mpm_event "etc/_mpm_event.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
wsgi-keystone.conf: |+
{{ tuple "etc/_wsgi-keystone.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- tuple .Values.conf.wsgi_keystone "etc/_wsgi-keystone.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
sso_callback_template.html: |+
{{ tuple "etc/_sso_callback_template.html.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- tuple .Values.conf.sso_callback_template "etc/_sso_callback_template.html.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}

View File

@ -250,6 +250,15 @@ conf:
policy:
override:
append:
mpm_event:
override:
append:
wsgi_keystone:
override:
append:
sso_callback_template:
override:
append:
keystone:
override:
append:

View File

@ -66,33 +66,9 @@ metadata:
name: magnum-etc
data:
magnum.conf: |+
{{ if .Values.conf.magnum.override -}}
{{ .Values.conf.magnum.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.magnum.prefix -}}
{{ .Values.conf.magnum.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_magnum.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.magnum.append -}}
{{ .Values.conf.magnum.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.magnum "etc/_magnum.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
api-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- tuple .Values.conf.policy "etc/_policy.json.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}

View File

@ -65,27 +65,7 @@ metadata:
name: mistral-etc
data:
mistral.conf: |+
{{ if .Values.conf.mistral.override -}}
{{ .Values.conf.mistral.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.mistral.prefix -}}
{{ .Values.conf.mistral.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_mistral.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.mistral.append -}}
{{ .Values.conf.mistral.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.mistral "etc/_mistral.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.policy.prefix -}}
{{ .Values.conf.policy.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.policy.append -}}
{{ .Values.conf.policy.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.policy "etc/_policy.json.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}

View File

@ -84,172 +84,32 @@ metadata:
name: neutron-etc
data:
rally_tests.yaml: |+
{{ if .Values.conf.rally_tests.override -}}
{{ .Values.conf.rally_tests.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.rally_tests.prefix -}}
{{ .Values.conf.rally_tests.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.rally_tests.append -}}
{{ .Values.conf.rally_tests.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.rally_tests "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
api-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.policy.prefix -}}
{{ .Values.conf.policy.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.policy.append -}}
{{ .Values.conf.policy.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.policy "etc/_policy.json.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
dhcp_agent.ini: |+
{{ if .Values.conf.dhcp_agent.override -}}
{{ .Values.conf.dhcp_agent.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.dhcp_agent.prefix -}}
{{ .Values.conf.dhcp_agent.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_dhcp_agent.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.dhcp_agent.append -}}
{{ .Values.conf.dhcp_agent.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.dhcp_agent "etc/_dhcp_agent.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
l3_agent.ini: |+
{{ if .Values.conf.l3_agent.override -}}
{{ .Values.conf.l3_agent.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.l3_agent.prefix -}}
{{ .Values.conf.l3_agent.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_l3_agent.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.l3_agent.append -}}
{{ .Values.conf.l3_agent.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.l3_agent "etc/_l3_agent.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
metadata_agent.ini: |+
{{ if .Values.conf.metadata_agent.override -}}
{{ .Values.conf.metadata_agent.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.metadata_agent.prefix -}}
{{ .Values.conf.metadata_agent.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_metadata_agent.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.metadata_agent.append -}}
{{ .Values.conf.metadata_agent.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.metadata_agent "etc/_metadata_agent.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
metering_agent.ini: |+
{{ if .Values.conf.metering_agent.override -}}
{{ .Values.conf.metering_agent.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.metering_agent.prefix -}}
{{ .Values.conf.metering_agent.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_metering_agent.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.metering_agent.append -}}
{{ .Values.conf.metering_agent.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.metering_agent "etc/_metering_agent.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
neutron.conf: |+
{{ if .Values.conf.neutron.override -}}
{{ .Values.conf.neutron.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.neutron.prefix -}}
{{ .Values.conf.neutron.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_neutron.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.neutron.append -}}
{{ .Values.conf.neutron.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.neutron "etc/_neutron.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
ml2_conf.ini: |+
{{ if .Values.conf.ml2_conf.override -}}
{{ .Values.conf.ml2_conf.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.ml2_conf.prefix -}}
{{ .Values.conf.ml2_conf.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/plugins/_ml2_conf.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.ml2_conf.append -}}
{{ .Values.conf.ml2_conf.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.ml2_conf "etc/plugins/_ml2_conf.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
ml2_conf_sriov.ini: |+
{{ if .Values.conf.ml2_conf_sriov.override -}}
{{ .Values.conf.ml2_conf_sriov.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.ml2_conf_sriov.prefix -}}
{{ .Values.conf.ml2_conf_sriov.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/plugins/_ml2_conf_sriov.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.ml2_conf_sriov.append -}}
{{ .Values.conf.ml2_conf_sriov.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.ml2_conf_sriov "etc/plugins/_ml2_conf_sriov.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
macvtap_agent.ini: |+
{{ if .Values.conf.macvtap_agent.override -}}
{{ .Values.conf.macvtap_agent.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.macvtap_agent.prefix -}}
{{ .Values.conf.macvtap_agent.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/plugins/_macvtap_agent.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.macvtap_agent.append -}}
{{ .Values.conf.macvtap_agent.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.macvtap_agent "etc/plugins/_macvtap_agent.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
linuxbridge_agent.ini: |+
{{ if .Values.conf.linuxbridge_agent.override -}}
{{ .Values.conf.linuxbridge_agent.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.linuxbridge_agent.prefix -}}
{{ .Values.conf.linuxbridge_agent.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/plugins/_linuxbridge_agent.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.linuxbridge_agent.append -}}
{{ .Values.conf.linuxbridge_agent.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.linuxbridge_agent "etc/plugins/_linuxbridge_agent.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
openvswitch_agent.ini: |+
{{ if .Values.conf.openvswitch_agent.override -}}
{{ .Values.conf.openvswitch_agent.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.openvswitch_agent.prefix -}}
{{ .Values.conf.openvswitch_agent.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/plugins/_openvswitch_agent.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.openvswitch_agent.append -}}
{{ .Values.conf.openvswitch_agent.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.openvswitch_agent "etc/plugins/_openvswitch_agent.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
sriov_agent.ini: |+
{{ if .Values.conf.sriov_agent.override -}}
{{ .Values.conf.sriov_agent.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.sriov_agent.prefix -}}
{{ .Values.conf.sriov_agent.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/plugins/_sriov_agent.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.sriov_agent.append -}}
{{ .Values.conf.sriov_agent.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.sriov_agent "etc/plugins/_sriov_agent.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
dnsmasq.conf: ""
{{- end }}

View File

@ -94,49 +94,15 @@ metadata:
name: nova-etc
data:
rally_tests.yaml: |+
{{ if .Values.conf.rally_tests.override -}}
{{ .Values.conf.rally_tests.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.rally_tests.prefix -}}
{{ .Values.conf.rally_tests.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.rally_tests.append -}}
{{ .Values.conf.rally_tests.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.rally_tests "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
nova.conf: |+
{{ if .Values.conf.nova.override -}}
{{ .Values.conf.nova.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.nova.prefix -}}
{{ .Values.conf.nova.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_nova.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.nova.append -}}
{{ .Values.conf.nova.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.nova "etc/_nova.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
api-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.yaml: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{ tuple "etc/_policy.yaml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- tuple .Values.conf.policy "etc/_policy.yaml.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
libvirtd.conf: |+
{{ tuple "etc/_libvirtd.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- tuple .Values.conf.libvirtd "etc/_libvirtd.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
qemu.conf: |+
{{ tuple "etc/_qemu.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- tuple .Values.conf.qemu "etc/_qemu.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}

View File

@ -276,6 +276,12 @@ conf:
policy:
override:
append:
libvirtd:
override:
append:
qemu:
override:
append:
nova:
override:
append:

View File

@ -66,33 +66,9 @@ metadata:
name: senlin-etc
data:
senlin.conf: |+
{{ if .Values.conf.senlin.override -}}
{{ .Values.conf.senlin.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.senlin.prefix -}}
{{ .Values.conf.senlin.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_senlin.conf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.senlin.append -}}
{{ .Values.conf.senlin.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.senlin "etc/_senlin.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
api-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
{{- tuple .Values.conf.paste "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}
{{- tuple .Values.conf.policy "etc/_policy.json.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
{{- end }}