From 2f64562bbac3f5684c18f281e81aea5c65685d4a Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Fri, 27 Sep 2019 09:42:36 -0500 Subject: [PATCH] HTK: support csv list in oslo conf rendering Some configuration options that with older openstack releases were multistrings have now changed to csv values under a single key, this change makes that simple to accomodate. Change-Id: Id941a1e56e4a852d764084c958c13588b8e3ed85 Signed-off-by: Pete Birley --- helm-toolkit/templates/utils/_to_oslo_conf.tpl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/helm-toolkit/templates/utils/_to_oslo_conf.tpl b/helm-toolkit/templates/utils/_to_oslo_conf.tpl index 8111702e8..2aad1aef6 100644 --- a/helm-toolkit/templates/utils/_to_oslo_conf.tpl +++ b/helm-toolkit/templates/utils/_to_oslo_conf.tpl @@ -28,6 +28,12 @@ values: | values: - messagingv2 - log + oslo_messaging_notifications_stein: + driver: # An example of a csv option's syntax + type: csv + values: + - messagingv2 + - log security_compliance: password_expires_ignore_user_ids: # Values in a list will be converted to a comma separated key @@ -41,6 +47,8 @@ return: | [oslo_messaging_notifications] driver = messagingv2 driver = log + [oslo_messaging_notifications_stein] + driver = messagingv2,log [security_compliance] password_expires_ignore_user_ids = 123,456 */}} @@ -57,7 +65,9 @@ return: | {{- range $k, $multistringValue := $value.values -}} {{ $key }} = {{ $multistringValue }} {{ end -}} -{{- end -}} +{{ else if eq $value.type "csv" -}} +{{ $key }} = {{ include "helm-toolkit.utils.joinListWithComma" $value.values }} +{{ end -}} {{- else -}} {{ $key }} = {{ $value }} {{ end -}}