(feat) Add auto-discovery in k8s | Adarsh
This commit is contained in:
@ -2,14 +2,15 @@ package config
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/TwinProduction/gatus/alerting"
|
||||
"github.com/TwinProduction/gatus/alerting/provider"
|
||||
"github.com/TwinProduction/gatus/core"
|
||||
"github.com/TwinProduction/gatus/security"
|
||||
"gopkg.in/yaml.v2"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -59,6 +60,18 @@ type Config struct {
|
||||
|
||||
// Services List of services to monitor
|
||||
Services []*core.Service `yaml:"services"`
|
||||
|
||||
//AutoDiscoverK8SServices to discover services to monitor
|
||||
AutoDiscoverK8SServices bool `yaml:"auto-discover-k8s-services"`
|
||||
|
||||
//K8SServiceSuffix to append to service name
|
||||
K8SServiceSuffix string `yaml:"k8s-service-suffix"`
|
||||
|
||||
K8SServiceConfig core.Service `yaml:"k8s-service-config"`
|
||||
|
||||
ExcludeSuffix []string `yaml:"exclude-suffix"`
|
||||
|
||||
K8sClusterMode string `yaml:"k8s-cluster-mode"`
|
||||
}
|
||||
|
||||
// Get returns the configuration, or panics if the configuration hasn't loaded yet
|
||||
|
Reference in New Issue
Block a user