forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
37 lines (31 loc) · 1.09 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package kubernetes
import (
"time"
"github.com/elastic/beats/libbeat/common"
)
type kubeAnnotatorConfig struct {
InCluster bool `config:"in_cluster"`
KubeConfig string `config:"kube_config"`
Host string `config:"host"`
Namespace string `config:"namespace"`
SyncPeriod time.Duration `config:"sync_period"`
Indexers PluginConfig `config:"indexers"`
Matchers PluginConfig `config:"matchers"`
DefaultMatchers Enabled `config:"default_matchers"`
DefaultIndexers Enabled `config:"default_indexers"`
IncludeLabels []string `config:"include_labels"`
IncludeAnnotations []string `config:"include_annotations"`
}
type Enabled struct {
Enabled bool `config:"enabled"`
}
type PluginConfig []map[string]common.Config
func defaultKuberentesAnnotatorConfig() kubeAnnotatorConfig {
return kubeAnnotatorConfig{
InCluster: true,
SyncPeriod: 1 * time.Second,
Namespace: "kube-system",
DefaultMatchers: Enabled{true},
DefaultIndexers: Enabled{true},
}
}