forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
31 lines (25 loc) · 858 Bytes
/
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
package kubernetes
import (
"time"
"github.com/elastic/beats/libbeat/autodiscover/template"
)
// Config for kubernetes autodiscover provider
type Config 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"`
CleanupTimeout time.Duration `config:"cleanup_timeout"`
IncludeLabels []string `config:"include_labels"`
ExcludeLabels []string `config:"exclude_labels"`
IncludeAnnotations []string `config:"include_annotations"`
Templates template.MapperSettings `config:"templates"`
}
func defaultConfig() *Config {
return &Config{
InCluster: true,
SyncPeriod: 1 * time.Second,
CleanupTimeout: 60 * time.Second,
}
}