diff --git a/CHANGELOG.md b/CHANGELOG.md index 98e2eb5a..06595cc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +# 2.18.0 +* Policy Reporter + * Improved logging configuration + * Support JSON logging + * Support log level + * optional API access logging with `api.logging` set to `true` + * New aggregation table for API performance improvements + * Helm Ingress template +* Policy Reporter KyvernoPlugin + * Helm Ingress template + # 2.17.0 * Policy Reporter * Use metaclient to reduce informer memory usage diff --git a/charts/policy-reporter/config.yaml b/charts/policy-reporter/config.yaml index b2e0bb15..508557f4 100644 --- a/charts/policy-reporter/config.yaml +++ b/charts/policy-reporter/config.yaml @@ -251,10 +251,10 @@ redis: {{- toYaml . | nindent 2 }} {{- end }} -{{- with .Values.logging }} logging: - {{- toYaml . | nindent 2 }} -{{- end }} + encoding: {{ .Values.logging.encoding }} + logLevel: {{ include "policyreporter.logLevel" . }} + development: {{ .Values.logging.development }} api: logging: {{ .Values.api.logging }} diff --git a/charts/policy-reporter/templates/_helpers.tpl b/charts/policy-reporter/templates/_helpers.tpl index 3de05f68..35eaf252 100644 --- a/charts/policy-reporter/templates/_helpers.tpl +++ b/charts/policy-reporter/templates/_helpers.tpl @@ -113,3 +113,12 @@ maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} {{- .Release.Namespace -}} {{- end -}} {{- end -}} + +{{/* Get the namespace name. */}} +{{- define "policyreporter.logLevel" -}} +{{- if .Values.api.logging -}} +-1 +{{- else -}} +{{- .Values.logging.logLevel -}} +{{- end -}} +{{- end -}} diff --git a/charts/policy-reporter/values.yaml b/charts/policy-reporter/values.yaml index 3afd2822..cc03cff1 100644 --- a/charts/policy-reporter/values.yaml +++ b/charts/policy-reporter/values.yaml @@ -121,7 +121,7 @@ logging: development: false # more human readable structure, enables stacktraces and removes log sampling api: - logging: false # enable API access logging + logging: false # enable debug API access logging, sets logLevel to debug # REST API rest: