diff --git a/charts/policy-reporter/charts/ui/templates/_helpers.tpl b/charts/policy-reporter/charts/ui/templates/_helpers.tpl index 9b84e642..4acef88c 100644 --- a/charts/policy-reporter/charts/ui/templates/_helpers.tpl +++ b/charts/policy-reporter/charts/ui/templates/_helpers.tpl @@ -128,4 +128,13 @@ Create the name of the service account to use {{- else -}} {{- .Release.Namespace -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} + +{{/* Get the namespace name. */}} +{{- define "ui.logLevel" -}} +{{- if .Values.api.logging -}} +-1 +{{- else -}} +{{- .Values.logging.logLevel -}} +{{- end -}} +{{- end -}} diff --git a/charts/policy-reporter/charts/ui/templates/config.yaml b/charts/policy-reporter/charts/ui/templates/config.yaml index 7ef10c76..48c034be 100644 --- a/charts/policy-reporter/charts/ui/templates/config.yaml +++ b/charts/policy-reporter/charts/ui/templates/config.yaml @@ -38,7 +38,10 @@ data: {{- toYaml . | nindent 6 }} {{- end }} - {{- with .Values.logging }} logging: - {{- toYaml . | nindent 6 }} - {{- end }} + encoding: {{ .Values.logging.encoding }} + logLevel: {{ include "ui.logLevel" . }} + development: {{ .Values.logging.development }} + + apiConfig: + logging: {{ .Values.api.logging }} \ No newline at end of file diff --git a/charts/policy-reporter/charts/ui/values.yaml b/charts/policy-reporter/charts/ui/values.yaml index e68cc245..160740da 100644 --- a/charts/policy-reporter/charts/ui/values.yaml +++ b/charts/policy-reporter/charts/ui/values.yaml @@ -67,11 +67,13 @@ labelFilter: [] # Proxy request logging logging: - enabled: false # enables additional logging about proxy requests encoding: console # possible encodings are console and json logLevel: 0 # default info development: false # more human readable structure, removes log sampling +api: + logging: false # enables access logging for proxy requests, sets log level to debug + # use redis as external log storage instead of an in memory store # recommended when using a HA setup with more then one replica # to get all logs on each instance