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 k8s metadata regression #29329

Merged
merged 5 commits into from
Dec 8, 2021
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
11 changes: 6 additions & 5 deletions libbeat/autodiscover/providers/kubernetes/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ var DefaultCleanupTimeout time.Duration = 0

func defaultConfig() *Config {
return &Config{
SyncPeriod: 10 * time.Minute,
Resource: "pod",
CleanupTimeout: DefaultCleanupTimeout,
Prefix: "co.elastic",
Unique: false,
SyncPeriod: 10 * time.Minute,
Resource: "pod",
CleanupTimeout: DefaultCleanupTimeout,
Prefix: "co.elastic",
Unique: false,
AddResourceMetadata: metadata.GetDefaultResourceMetadataConfig(),
}
}

Expand Down
11 changes: 6 additions & 5 deletions libbeat/processors/add_kubernetes_metadata/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ type PluginConfig []map[string]common.Config

func defaultKubernetesAnnotatorConfig() kubeAnnotatorConfig {
return kubeAnnotatorConfig{
SyncPeriod: 10 * time.Minute,
CleanupTimeout: 60 * time.Second,
DefaultMatchers: Enabled{true},
DefaultIndexers: Enabled{true},
Scope: "node",
SyncPeriod: 10 * time.Minute,
CleanupTimeout: 60 * time.Second,
DefaultMatchers: Enabled{true},
DefaultIndexers: Enabled{true},
Scope: "node",
AddResourceMetadata: metadata.GetDefaultResourceMetadataConfig(),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (c *Config) InitDefaults() {
c.Scope = "node"
c.LabelsDedot = true
c.AnnotationsDedot = true
c.AddResourceMetadata = metadata.GetDefaultResourceMetadataConfig()
}

// Validate ensures correctness of config
Expand Down