Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logs): fix excluding logs by container, namespace, node, pod regex #2853

Merged
merged 1 commit into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- fix(logs): fix excluding logs by container, namespace, node, pod regex

[Unreleased]: https://github.com/SumoLogic/sumologic-kubernetes-collection/compare/v3.0.0...release-v3.0

## [v3.0.0]

### Migration from v2
Expand Down
8 changes: 4 additions & 4 deletions deploy/helm/sumologic/conf/logs/otelcol/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ processors:
source_category_prefix: {{ .Values.sumologic.logs.container.sourceCategoryPrefix | quote }}
source_category_replace_dash: {{ .Values.sumologic.logs.container.sourceCategoryReplaceDash | quote }}
exclude:
k8s.namespace.name: {{ include "logs.excludeNamespaces" . }}
k8s.pod.name: {{ .Values.sumologic.logs.container.excludePodRegex | quote }}
k8s.container.name: {{ .Values.sumologic.logs.container.excludeContainerRegex | quote }}
k8s.node.name: {{ .Values.sumologic.logs.container.excludeHostRegex | quote }}
namespace: {{ include "logs.excludeNamespaces" . }}
pod: {{ .Values.sumologic.logs.container.excludePodRegex | quote }}
container: {{ .Values.sumologic.logs.container.excludeContainerRegex | quote }}
node: {{ .Values.sumologic.logs.container.excludeHostRegex | quote }}
annotation_prefix: "pod_annotations_"
pod_template_hash_key: "pod_labels_pod-template-hash"
pod_name_key: "pod_name"
Expand Down
8 changes: 4 additions & 4 deletions tests/helm/metadata_logs_otc/static/otel.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ data:
enabled: false
prefixes: []
exclude:
k8s.container.name: ""
k8s.namespace.name: ""
k8s.node.name: ""
k8s.pod.name: ""
container: ""
namespace: ""
node: ""
pod: ""
pod_key: pod
pod_name_key: pod_name
pod_template_hash_key: pod_labels_pod-template-hash
Expand Down
8 changes: 4 additions & 4 deletions tests/helm/metadata_logs_otc/static/templates.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ data:
enabled: false
prefixes: []
exclude:
k8s.container.name: my_containers_excludeContainerRegex
k8s.namespace.name: my_containers_excludeNamespaceRegex
k8s.node.name: my_containers_excludeHostRegex
k8s.pod.name: my_containers_excludePodRegex
container: my_containers_excludeContainerRegex
namespace: my_containers_excludeNamespaceRegex
node: my_containers_excludeHostRegex
pod: my_containers_excludePodRegex
pod_key: pod
pod_name_key: pod_name
pod_template_hash_key: pod_labels_pod-template-hash
Expand Down