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
- type Formatter
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:"keptn"`
SplunkEndpoint string `envconfig:"SPLUNK_ENDPOINT" default:"localhost:8089"`
}
EnvConfig holds the configuration of environment variables that this service uses
Click to show internal directories.
Click to hide internal directories.