Documentation
¶
Index ¶
- Constants
- func EnvVarOrDefault(envName, defaultVal string) string
- func GetKubeClient() (*kubernetes.Clientset, error)
- func ListK8sServicesByLabel(svcLabelSelector, namespace string) (*v1.ServiceList, error)
- func ReadK8sSecretAsString(namespace string, secretName string, secretKey string) (string, error)
- type EnvConfig
Constants ¶
View Source
const ServiceName = "splunk-sli-provider"
ServiceName holds the name of this service
View Source
const SliResourceURI = "splunk/sli.yaml"
SliResourceURI holds the name of the SLI file that this service uses
Variables ¶
This section is empty.
Functions ¶
func EnvVarOrDefault ¶
EnvVarOrDefault returns the value of the environment variable named "envName" if found or "defaultVal" otherwise
func GetKubeClient ¶
func GetKubeClient() (*kubernetes.Clientset, error)
GetKubeClient returns a k8s ClientSet using the in-cluster config
func ListK8sServicesByLabel ¶
ListK8sServicesByLabel returns a k8s service list matching the passed labelSelector in the specified namespace
Types ¶
type EnvConfig ¶
type EnvConfig struct {
// Port on which to listen for cloudevents
Port int `envconfig:"RCV_PORT" default:"8080"`
Path string `envconfig:"RCV_PATH" default:"/events"`
ConfigurationServiceURL string `envconfig:"CONFIGURATION_SERVICE" default:""`
SplunkNamespace string `envconfig:"SPLUNK_NS" default:""`
SplunkConfigMap string `envconfig:"SPLUNK_CM" default:""`
SplunkLabels string `envconfig:"SPLUNK_LABELS" default:""`
AlertManagerLabels string `envconfig:"ALERT_MANAGER_LABELS" default:""`
AlertManagerNamespace string `envconfig:"ALERT_MANAGER_NS" default:""`
AlertManagerConfigMap string `envconfig:"ALERT_MANAGER_CM" default:""`
AlertManagerTemplateConfigMap string `envconfig:"ALERT_MANAGER_TEMPLATE_CM" default:"alertmanager-templates"`
SplunkConfigFileName string `envconfig:"SPLUNK_CONFIG_FILENAME" default:"splunk.yml"`
AlertManagerConfigFileName string `envconfig:"ALERT_MANAGER_CONFIG_FILENAME" default:"alertmanager.yml"`
PodNamespace string `envconfig:"POD_NAMESPACE" default:""`
SplunkEndpoint string `envconfig:"SPLUNK_ENDPOINT" default:""`
K8sNamespace string `envconfig:"K8S_NAMESPACE" required:"true"`
}
EnvConfig holds the configuration of environment variables that this service uses
Directories
¶
| Path | Synopsis |
|---|---|
|
Package prometheus contains copied code parts of the prometheus project (https://github.com/prometheus/prometheus) See the description of the different structures to get more information on where they have been extracted These definitions should match the structs in the supported prometheus version
|
Package prometheus contains copied code parts of the prometheus project (https://github.com/prometheus/prometheus) See the description of the different structures to get more information on where they have been extracted These definitions should match the structs in the supported prometheus version |
|
fake
Package fake is a generated GoMock package.
|
Package fake is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.