From 370f4e9f5c19163b6bd9c9753609e6f722d811a8 Mon Sep 17 00:00:00 2001 From: Oleksii Grudev Date: Mon, 23 Nov 2020 18:33:08 +0200 Subject: [PATCH] Remove trailing slash in endpoinds This patch removes trailing slash in endpoint address in case the path is empty. Co-Authored-By: Vasyl Saienko vsaienko@mirantis.com Change-Id: I11ace7d434b7c43f519d7ec6ac847ef94916202f --- helm-toolkit/Chart.yaml | 2 +- .../templates/endpoints/_keystone_endpoint_path_lookup.tpl | 4 ++-- releasenotes/notes/helm-toolkit.yaml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/helm-toolkit/Chart.yaml b/helm-toolkit/Chart.yaml index f2ae8a0fa..638dfe339 100644 --- a/helm-toolkit/Chart.yaml +++ b/helm-toolkit/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Helm-Toolkit name: helm-toolkit -version: 0.2.73 +version: 0.2.74 home: https://docs.openstack.org/openstack-helm icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png sources: diff --git a/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl index b2ec6486c..24eb56942 100644 --- a/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl +++ b/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl @@ -40,9 +40,9 @@ return: | {{- $context := index . 3 -}} {{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }} {{- if kindIs "string" $endpointMap.path }} -{{- printf "%s" $endpointMap.path | default "/" -}} +{{- printf "%s" $endpointMap.path | default "" -}} {{- else -}} -{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }} +{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }} {{- printf "%s" $endpointPath -}} {{- end -}} {{- end -}} diff --git a/releasenotes/notes/helm-toolkit.yaml b/releasenotes/notes/helm-toolkit.yaml index ffbc0f3b1..95678e255 100644 --- a/releasenotes/notes/helm-toolkit.yaml +++ b/releasenotes/notes/helm-toolkit.yaml @@ -80,4 +80,5 @@ helm-toolkit: - 0.2.71 Add snippet with service parameters - 0.2.72 Add snippet configmap_oslo_policy - 0.2.73 Add ability to get multiple hosts endpoint + - 0.2.74 Remove trailing slash in endpoinds ...