Documentation ¶
Overview ¶
Copyright (c) 2021 Red Hat, Inc. Copyright Contributors to the Open Cluster Management project
Index ¶
Constants ¶
View Source
const ( DEFAULT_SERVICE_PORT = ":3030" DEFAULT_HTTP_TIMEOUT = 180000 // 3 minutes HTTP Timeout DEFAULT_CCX_SERVER = "http://localhost:8080/api/v1/clusters" // For local use only DEFAULT_POLL_INTERVAL = 30 // 30mins default polling interval cloud.redhat.com DEFAULT_REQUEST_INTERVAL = 1 // 1 second Interval between 2 consecutive requests DEFAULT_POD_NAMESPACE = "kube-system" // Namespace of insights-client pod )
Variables ¶
View Source
var Cfg = Config{}
Cfg service configuration
Functions ¶
func GetDynamicClient ¶
Get the kubernetes dynamic client.
func GetKubeClient ¶
func GetKubeClient() *kubernetes.Clientset
Types ¶
type Config ¶
type Config struct { ServicePort string `env:"SERVICE_PORT"` HTTPTimeout int `env:"HTTP_TIMEOUT"` // timeout when the http server should drop connections CCXServer string `env:"CCX_SERVER"` KubeConfig string `env:"KUBECONFIG"` // Local kubeconfig path CCXToken string `env:"CCX_TOKEN"` // Token to access CCX server , when pull-secret cannot be used PollInterval int `env:"POLL_INTERVAL"` // Polling interval to reports from cloud.redhat.com RequestInterval int `env:"REQUEST_INTERVAL"` // Interval between 2 consequent requests CACert string `env:"CACert"` // base64 encoded caCert used for dev & test PodNamespace string `env:"POD_NAMESPACE"` // Namespace of insights-client pod }
Config - Define a config type to hold our config properties.
Click to show internal directories.
Click to hide internal directories.