Skip to content

Commit

Permalink
add comment for the config validation check
Browse files Browse the repository at this point in the history
Signed-off-by: Tetiana Kravchenko <[email protected]>
  • Loading branch information
tetianakravchenko committed Nov 9, 2021
1 parent 82a9f2d commit 2dfe013
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libbeat/processors/add_kubernetes_metadata/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ func (k *kubeAnnotatorConfig) Validate() error {
k.Host = ""
}

// Checks below were added to warn the users early on and avoid initialising the processor in case the `logs_path`
// matcher config is not valid: supported paths defined as a `logs_path` configuration setting are strictly defined
// if `resource_type` is set
for _, matcher := range k.Matchers {
if matcherCfg, ok := matcher["logs_path"]; ok {
if matcherCfg.HasField("resource_type") {
Expand Down

0 comments on commit 2dfe013

Please sign in to comment.