From b91816920f030d24f01f25aa6f0c0e3a8ac2918c Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Mon, 20 May 2024 15:31:27 +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 abeb6d42..9930998c 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -66,6 +66,9 @@ spec: - --disable-postgrest={{ .Values.disablePostgrest }} - --change-retention-days={{ .Values.configChangeRetentionDays }} - --analysis-retention-days={{ .Values.configAnalysisRetentionDays }} + {{- if .Values.jsonLogs }} + - --json-logs + {{- end }} {{- if .Values.db.runMigrations}} - --db-migrations {{- end}} diff --git a/chart/values.yaml b/chart/values.yaml index 92feb6b6..4cac7efb 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -26,6 +26,8 @@ image: configChangeRetentionDays: 60 configAnalysisRetentionDays: 60 +jsonLogs: true + # a list of configmaps to load scrape rules from, the configmap should have a single entry called "config.yaml" scrapeRuleConfigMaps: - config-db-rules From cc1d995da70cd27a5eccaf448e11fd4a7166d676 Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Mon, 20 May 2024 15:47:10 +0530 Subject: [PATCH 2/2] chore: set default log level to info --- chart/templates/deployment.yaml | 4 +++- chart/values.yaml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 9930998c..26fcce23 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -62,7 +62,9 @@ spec: - /app/config-db args: - operator - - -v + {{- if .Values.logLevel }} + - {{ .Values.logLevel }} + {{- end }} - --disable-postgrest={{ .Values.disablePostgrest }} - --change-retention-days={{ .Values.configChangeRetentionDays }} - --analysis-retention-days={{ .Values.configAnalysisRetentionDays }} diff --git a/chart/values.yaml b/chart/values.yaml index 4cac7efb..06b6becd 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -26,6 +26,8 @@ image: configChangeRetentionDays: 60 configAnalysisRetentionDays: 60 +# -v, -vv, -vvv +logLevel: "" jsonLogs: true # a list of configmaps to load scrape rules from, the configmap should have a single entry called "config.yaml"