From bab44d50986460c2a40bfe2fbf38aa0318049f84 Mon Sep 17 00:00:00 2001 From: Mohammad Yosefpor Date: Mon, 18 Oct 2021 23:21:54 +0330 Subject: [PATCH] fix(charts): fix policy-reporter-ui backend name Signed-off-by: Mohammad Yosefpor --- charts/policy-reporter/charts/ui/templates/_helpers.tpl | 4 +++- charts/policy-reporter/values.yaml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/charts/policy-reporter/charts/ui/templates/_helpers.tpl b/charts/policy-reporter/charts/ui/templates/_helpers.tpl index 4a71a126..625a847e 100644 --- a/charts/policy-reporter/charts/ui/templates/_helpers.tpl +++ b/charts/policy-reporter/charts/ui/templates/_helpers.tpl @@ -77,7 +77,9 @@ Create the name of the service account to use {{- $name := .Chart.Name }} {{- if .Values.global.fullnameOverride }} {{- .Values.global.fullnameOverride }} +{{- else if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} -{{- .Values.global.backend }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} {{- end }} {{- end }} diff --git a/charts/policy-reporter/values.yaml b/charts/policy-reporter/values.yaml index 71a27869..e49e664c 100644 --- a/charts/policy-reporter/values.yaml +++ b/charts/policy-reporter/values.yaml @@ -99,8 +99,8 @@ global: plugins: # enable kyverno for Policy Reporter UI and monitoring keyverno: false - # The name of service policy-report. If you changed ReleaseName you have to replace it - backend: policy-reporter + # The name of service policy-report. Defaults to ReleaseName. + backend: "" # Service Port number port: 8080 fullnameOverride: ""