Skip to content

Commit

Permalink
Merge pull request #1794 from kube-logging/namespace-labels-default-on
Browse files Browse the repository at this point in the history
Enable kubernetes namespace labels added to the metadata by default
  • Loading branch information
pepov authored Aug 13, 2024
2 parents 8c11c30 + c65f1f0 commit 1330e1c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/configuration/crds/v1beta1/fluentbit_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ Configurable TTL for K8s cached namespace metadata. (15m)

Include Kubernetes namespace labels on every record

Default: On

### Regex_Parser (string, optional) {#filterkubernetes-regex_parser}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ func TestFluentdAggregator_NamespaceLabel(t *testing.T) {
Keepalive: utils.BoolPointer(false),
},
FilterKubernetes: v1beta1.FilterKubernetes{
// Namespace labels enrichment must be enabled explicitly for now
NamespaceLabels: "On",
// Namespace labels enrichment is enabled by default starting with version 4.9
// NamespaceLabels: "On",
},
},
FluentdSpec: &v1beta1.FluentdSpec{
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/logging/api/v1beta1/fluentbit_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ type FilterKubernetes struct {
// Include Kubernetes resource annotations in the extra metadata. (default:On)
Annotations string `json:"Annotations,omitempty"`
// Include Kubernetes namespace labels on every record
NamespaceLabels string `json:"namespace_labels,omitempty"`
NamespaceLabels string `json:"namespace_labels,omitempty" plugin:"default:On"`
// Include Kubernetes namespace annotations on every record
NamespaceAnnotations string `json:"namespace_annotations,omitempty"`
// Configurable TTL for K8s cached namespace metadata. (15m)
Expand Down

0 comments on commit 1330e1c

Please sign in to comment.