(feat) Add auto-discovery in k8s | Adarsh

This commit is contained in:
Adarsh K Kumar
2020-10-30 21:00:03 +05:30
parent d76caeeb35
commit 81e6e0b188
1170 changed files with 441034 additions and 14 deletions

View File

@ -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