Skip to content

Commit

Permalink
fix(charts): fix policy-reporter-ui backend name (#85)
Browse files Browse the repository at this point in the history
* fix(charts): fix policy-reporter-ui backend name
* fix(charts): override first with global.backend

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>
  • Loading branch information
m-yosefpor authored Oct 18, 2021
1 parent 805b264 commit 4f79d27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions charts/policy-reporter/charts/ui/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ 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 "-" }}
{{- else }}
{{- .Values.global.backend }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/policy-reporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down

0 comments on commit 4f79d27

Please sign in to comment.