diff --git a/charts/base/templates/daemonset.yaml b/charts/base/templates/daemonset.yaml index b5aadf0..2ae6a08 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 and (kindIs "bool" ((.Values.logging.applicationLogs).enabled)) (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..6a6cb89 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