From 851860fb645e89903d484d199fe1cbd0c0cd3a8e Mon Sep 17 00:00:00 2001 From: David Fernandez Date: Wed, 13 May 2026 15:20:11 -0300 Subject: [PATCH 1/4] feat(base): add per-provider log/metrics split and applicationLogs toggle - Add applicationLogs.enabled flag (false disables all app log forwarding, keeping only http/sys metrics pipelines active) - Add mountDockerContainers flag for Docker runtime support (e.g. Minikube) - Add logsEnabled/metricsEnabled per-provider for datadog, newrelic, dynatrace instead of hardcoded 'true' - Update default controller image to beta-295461e Co-Authored-By: Claude Sonnet 4.6 --- charts/base/templates/daemonset.yaml | 26 ++++++++++++++++++++------ charts/base/values.yaml | 13 ++++++++++++- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/charts/base/templates/daemonset.yaml b/charts/base/templates/daemonset.yaml index b5aadf0..0063788 100644 --- a/charts/base/templates/daemonset.yaml +++ b/charts/base/templates/daemonset.yaml @@ -76,6 +76,11 @@ spec: name: containers - mountPath: /etc/null-logs/dynamic name: logs-config + {{- if .Values.logging.mountDockerContainers }} + - mountPath: /var/lib/docker/containers + name: docker-containers + readOnly: true + {{- end }} {{- if .Values.logging.streams.enabled }} - name: streams-config-vol mountPath: {{ .Values.logging.streams.mountPath | default "/etc/null-logs/streams-dd.conf" }} @@ -90,6 +95,10 @@ spec: env: - name: NULL_LOGS_RELOAD_ENABLED value: 'true' + {{- if not .Values.logging.applicationLogs.enabled }} + - name: APPLICATION_LOGS_DISABLED + value: "true" + {{- end }} {{- if .Values.logging.gelf.enabled }} - name: GELF_LOGS_ENABLED value: 'true' @@ -100,9 +109,9 @@ spec: {{- end }} {{- if .Values.logging.dynatrace.enabled }} - name: DYNATRACE_LOGS_ENABLED - value: 'true' + value: {{ .Values.logging.dynatrace.logsEnabled | quote }} - name: DYNATRACE_PERFORMANCE_METRICS_ENABLED - value: 'true' + value: {{ .Values.logging.dynatrace.metricsEnabled | quote }} {{- end }} - name: LOG_RESERVE_DATA value: 'False' @@ -110,9 +119,9 @@ spec: value: message {{- if .Values.logging.datadog.enabled }} - name: DATADOG_LOGS_ENABLED - value: 'true' + value: {{ .Values.logging.datadog.logsEnabled | quote }} - name: DATADOG_PERFORMANCE_METRICS_ENABLED - value: 'true' + value: {{ .Values.logging.datadog.metricsEnabled | quote }} {{- if .Values.logging.datadog.region }} - name: DATADOG_REGION value: {{ .Values.logging.datadog.region | quote }} @@ -125,9 +134,9 @@ spec: {{- end }} {{- if .Values.logging.newrelic.enabled }} - name: NEWRELIC_LOGS_ENABLED - value: "true" + value: {{ .Values.logging.newrelic.logsEnabled | quote }} - name: NEWRELIC_PERFORMANCE_METRICS_ENABLED - value: "true" + value: {{ .Values.logging.newrelic.metricsEnabled | quote }} - name: NEWRELIC_LICENSE_KEY value: {{ .Values.logging.newrelic.licenseKey | quote }} {{- if .Values.logging.newrelic.region }} @@ -204,5 +213,10 @@ spec: configMap: name: {{ .Values.logging.streamsConfigMapName | default "streams-dd-config" }} {{- end }} + {{- if .Values.logging.mountDockerContainers }} + - name: docker-containers + hostPath: + path: /var/lib/docker/containers + {{- end }} {{- end}} \ No newline at end of file diff --git a/charts/base/values.yaml b/charts/base/values.yaml index df079fe..dbc46c0 100644 --- a/charts/base/values.yaml +++ b/charts/base/values.yaml @@ -150,13 +150,18 @@ logging: # effect: "NoSchedule" tolerations: [] ensureLease: false + applicationLogs: + # Set to false to disable all application log forwarding across every provider. + # Only the metrics pipeline (http aggregation, system metrics) will remain active. + enabled: true + mountDockerContainers: false # set to true when using Docker container runtime (e.g. Minikube) streams: enabled: false mountPath: "/etc/null-logs/streams-dd.conf" subPath: "streams-dd.conf" streamsConfigMapName: "streams-dd-config" controller: - image: "public.ecr.aws/nullplatform/k8s-logs-controller:latest" + image: "public.ecr.aws/nullplatform/k8s-logs-controller:beta-295461e" resources: requests: cpu: 100m @@ -181,14 +186,20 @@ logging: matchRegex: "container.*.application" dynatrace: enabled: false + logsEnabled: true # set to false to send only metrics (DYNATRACE_PERFORMANCE_METRICS_ENABLED) + metricsEnabled: true # set to false to send only logs apiKey: "" environmentId: "" datadog: enabled: false + logsEnabled: true # set to false to send only metrics (DATADOG_PERFORMANCE_METRICS_ENABLED) + metricsEnabled: true # set to false to send only logs apiKey: "" region: "" newrelic: enabled: false + logsEnabled: true # set to false to send only metrics (NEWRELIC_PERFORMANCE_METRICS_ENABLED) + metricsEnabled: true # set to false to send only logs licenseKey: "" region: "" # CloudWatch configuration From cd515b09c85810d18146f0da91bf704c385a6173 Mon Sep 17 00:00:00 2001 From: David Fernandez Date: Wed, 13 May 2026 15:23:02 -0300 Subject: [PATCH 2/4] fix(base): nil-safe guard for applicationLogs.enabled Existing releases without applicationLogs in their values would evaluate 'not nil' as true, incorrectly disabling application logs. Using (.Values.logging.applicationLogs).enabled | default true ensures the field defaults to enabled when missing. Co-Authored-By: Claude Sonnet 4.6 --- charts/base/templates/daemonset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/base/templates/daemonset.yaml b/charts/base/templates/daemonset.yaml index 0063788..4a47af3 100644 --- a/charts/base/templates/daemonset.yaml +++ b/charts/base/templates/daemonset.yaml @@ -95,7 +95,7 @@ spec: env: - name: NULL_LOGS_RELOAD_ENABLED value: 'true' - {{- if not .Values.logging.applicationLogs.enabled }} + {{- if not ((.Values.logging.applicationLogs).enabled | default true) }} - name: APPLICATION_LOGS_DISABLED value: "true" {{- end }} From 899ec36af76a9d9e8cf73ef15cdbf63dc5f79147 Mon Sep 17 00:00:00 2001 From: David Fernandez Date: Wed, 13 May 2026 15:41:29 -0300 Subject: [PATCH 3/4] fix(base): use kindIs to correctly detect applicationLogs.enabled=false Helm's default function treats false as empty, so false | default true returns true, making it impossible to explicitly disable application logs. Using kindIs "bool" correctly distinguishes nil (field absent) from an explicit false value. Co-Authored-By: Claude Sonnet 4.6 --- charts/base/templates/daemonset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/base/templates/daemonset.yaml b/charts/base/templates/daemonset.yaml index 4a47af3..2ae6a08 100644 --- a/charts/base/templates/daemonset.yaml +++ b/charts/base/templates/daemonset.yaml @@ -95,7 +95,7 @@ spec: env: - name: NULL_LOGS_RELOAD_ENABLED value: 'true' - {{- if not ((.Values.logging.applicationLogs).enabled | default true) }} + {{- if and (kindIs "bool" ((.Values.logging.applicationLogs).enabled)) (not .Values.logging.applicationLogs.enabled) }} - name: APPLICATION_LOGS_DISABLED value: "true" {{- end }} From d82587aa4fe5bea5b0341c6a4639cbf07c9cd01c Mon Sep 17 00:00:00 2001 From: David Fernandez Date: Thu, 14 May 2026 12:42:36 -0300 Subject: [PATCH 4/4] fix: fix yaml lint spacing before comments in values.yaml Co-Authored-By: Claude Sonnet 4.6 --- charts/base/values.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/base/values.yaml b/charts/base/values.yaml index dbc46c0..6a6cb89 100644 --- a/charts/base/values.yaml +++ b/charts/base/values.yaml @@ -187,19 +187,19 @@ logging: dynatrace: enabled: false logsEnabled: true # set to false to send only metrics (DYNATRACE_PERFORMANCE_METRICS_ENABLED) - metricsEnabled: true # set to false to send only logs + metricsEnabled: true # set to false to send only logs apiKey: "" environmentId: "" datadog: enabled: false logsEnabled: true # set to false to send only metrics (DATADOG_PERFORMANCE_METRICS_ENABLED) - metricsEnabled: true # set to false to send only logs + metricsEnabled: true # set to false to send only logs apiKey: "" region: "" newrelic: enabled: false logsEnabled: true # set to false to send only metrics (NEWRELIC_PERFORMANCE_METRICS_ENABLED) - metricsEnabled: true # set to false to send only logs + metricsEnabled: true # set to false to send only logs licenseKey: "" region: "" # CloudWatch configuration