From 585c18b20cd8f67706a1bdd11e2ada052727513d Mon Sep 17 00:00:00 2001 From: Eric Wollesen Date: Thu, 25 Apr 2024 17:00:57 -0600 Subject: [PATCH] set TIDEPOOL_LOGGER_PACKAGE env var via helm chart Setting this value would allow services to use alternate logging packages, for example when running/testing locally, it's sometimes useful to log in a format other than JSON. See https://github.com/tidepool-org/platform/pull/714 for one such example logger. One can choose to configure this like so: # local/Tiltconfig.yaml global: loggerPackage: devlog And that value would get picked up and passed as TIDEPOOL_LOGGER_PACKAGE to services started via the helm chart. It can also be overridden on a short-term basis via: $ kubectl set env TIDEPOOL_LOGGER_PACKAGE=devlog Followed by restarting the deployment. --- charts/tidepool/templates/_helpers.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/tidepool/templates/_helpers.tpl b/charts/tidepool/templates/_helpers.tpl index b2abcdd4..b4979aca 100644 --- a/charts/tidepool/templates/_helpers.tpl +++ b/charts/tidepool/templates/_helpers.tpl @@ -120,6 +120,8 @@ Create environment variables used by all platform services. value: local - name: TIDEPOOL_LOGGER_LEVEL value: {{ .Values.global.logLevel }} + - name: TIDEPOOL_LOGGER_PACKAGE + value: {{ .Values.global.loggerPackage | default "json" }} - name: TIDEPOOL_SERVER_TLS value: "false" - name: TIDEPOOL_AUTH_SERVICE_SECRET