Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 4db6d7a

Browse files
committed
Improve docs
1 parent 3e2d8cd commit 4db6d7a

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/sources/kubernetes_logs/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ pub struct Config {
111111
///
112112
/// This can be useful to make Vector not pull in namespaces to reduce load on
113113
/// kube-apiserver and daemonset memory usage in clusters with lots of namespaces.
114+
/// In the case that this is set to `false`, fields based on namespace labels will not
115+
/// be available.
114116
///
117+
#[serde(default = "default_add_namespace_fields")]
115118
add_namespace_fields: bool,
116119

117120
/// The name of the Kubernetes [Node][node] that is running.
@@ -1059,6 +1062,11 @@ const fn default_oldest_first() -> bool {
10591062
true
10601063
}
10611064

1065+
// We'd like to add these in all but clusters with very many namespaces
1066+
const fn default_add_namespace_fields() -> bool {
1067+
true
1068+
}
1069+
10621070
const fn default_max_line_bytes() -> usize {
10631071
// NOTE: The below comment documents an incorrect assumption, see
10641072
// https://github.com/vectordotdev/vector/issues/6967

website/cue/reference/components/sources/generated/kubernetes_logs.cue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ generated: components: sources: kubernetes_logs: configuration: {
77
88
This can be useful to make Vector not pull in namespaces to reduce load on
99
kube-apiserver and daemonset memory usage in clusters with lots of namespaces.
10+
In the case that this is set to `false`, fields based on namespace labels will not
11+
be available.
1012
"""
1113
required: false
1214
type: bool: default: true

0 commit comments

Comments
 (0)