From 241f7f945c46623f8f0849e94b179390f5fc0994 Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Mon, 20 May 2024 15:27:54 +0530 Subject: [PATCH 1/2] feat: use json logs in chart by default --- chart/templates/deployment.yaml | 3 +++ chart/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 5d99fe3a4..789c6eee9 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -141,6 +141,9 @@ spec: {{- if gt (int .Values.replicas) 1 }} - --enable-leader-election=true {{- end }} + {{- if .Values.jsonLogs }} + - --json-logs + {{- end }} {{- range $k, $v := .Values.extraArgs}} - --{{$k}}={{$v}} {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index dd065175a..acc6910ff 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -35,6 +35,8 @@ grafanaDashboards: false debug: false logLevel: "-v" +jsonLogs: true + # restrict canary-checker to monitor single namespace for canaries. Leave blank to monitor all namespaces canaryNamespace: "" From a9ea1f176a29af1b280ad4be98bbbed3b1e08658 Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Mon, 20 May 2024 15:45:08 +0530 Subject: [PATCH 2/2] chore: set default log level to info --- chart/templates/deployment.yaml | 4 +++- chart/values.yaml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 789c6eee9..c9582ff35 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -128,7 +128,9 @@ spec: - /app/canary-checker args: - operator - - {{ .Values.logLevel}} + {{- if .Values.logLevel }} + - {{ .Values.logLevel }} + {{- end }} - --httpPort - "8080" - --disable-postgrest={{ .Values.disablePostgrest }} diff --git a/chart/values.yaml b/chart/values.yaml index acc6910ff..3dbc8dfd8 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -33,8 +33,9 @@ grafanaDashboards: false # Turn on pprof /debug endpoint debug: false -logLevel: "-v" +# -v, -vv, -vvv +logLevel: "" jsonLogs: true # restrict canary-checker to monitor single namespace for canaries. Leave blank to monitor all namespaces