From bab44d50986460c2a40bfe2fbf38aa0318049f84 Mon Sep 17 00:00:00 2001 From: Mohammad Yosefpor Date: Mon, 18 Oct 2021 23:21:54 +0330 Subject: [PATCH 1/3] 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: "" From 6f3f62889cb91166989a868153f3142896ccb70b Mon Sep 17 00:00:00 2001 From: Mohammad Yosefpor Date: Mon, 18 Oct 2021 23:32:48 +0330 Subject: [PATCH 2/3] fix(charts): override first with global.backend Signed-off-by: Mohammad Yosefpor --- charts/policy-reporter/charts/ui/templates/_helpers.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/policy-reporter/charts/ui/templates/_helpers.tpl b/charts/policy-reporter/charts/ui/templates/_helpers.tpl index 625a847e..fe444578 100644 --- a/charts/policy-reporter/charts/ui/templates/_helpers.tpl +++ b/charts/policy-reporter/charts/ui/templates/_helpers.tpl @@ -75,7 +75,9 @@ Create the name of the service account to use {{- define "ui.policyReportServiceName" -}} {{- $name := .Chart.Name }} -{{- if .Values.global.fullnameOverride }} +{{- if .Values.global.backend }} +{{- .Values.global.backend }} +{{- else if .Values.global.fullnameOverride }} {{- .Values.global.fullnameOverride }} {{- else if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} From be180d8763dd219aa66e0c553c24359b44c14bd6 Mon Sep 17 00:00:00 2001 From: Mohammad Yosefpor Date: Tue, 19 Oct 2021 02:20:22 +0330 Subject: [PATCH 3/3] fix(charts): fix to PR#85 Signed-off-by: Mohammad Yosefpor --- charts/policy-reporter/charts/ui/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/policy-reporter/charts/ui/templates/_helpers.tpl b/charts/policy-reporter/charts/ui/templates/_helpers.tpl index fe444578..3f4d98d0 100644 --- a/charts/policy-reporter/charts/ui/templates/_helpers.tpl +++ b/charts/policy-reporter/charts/ui/templates/_helpers.tpl @@ -74,7 +74,7 @@ Create the name of the service account to use {{- end }} {{- define "ui.policyReportServiceName" -}} -{{- $name := .Chart.Name }} +{{- $name := "policy-reporter" }} {{- if .Values.global.backend }} {{- .Values.global.backend }} {{- else if .Values.global.fullnameOverride }}