Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKubernetesApiUrlFromEnv ¶
GetKubernetesApiUrlFromEnv returns the k8s api url based on the content of standard env var :
KUBERNETES_SERVICE_HOST KUBERNETES_SERVICE_PORT in case the above ENV variables doesn't exist the function returns an empty string and an error
func GetKubernetesConnInfo ¶
func GetKubernetesConnInfo(l golog.MyLogger, defaultReadTimeout time.Duration) (*K8sInfo, ErrorConfig)
GetKubernetesConnInfo returns a K8sInfo with various information retrieved from the current k8s api url K8sInfo.CurrentNamespace contains the current namespace of the running pod K8sInfo.Token contains the bearer authentication token for the running k8s instance in which this pods lives K8sInfo.CaCert contains the certificate of the running k8s instance in which this pods lives
Types ¶
type ErrorConfig ¶
func (*ErrorConfig) Error ¶
func (e *ErrorConfig) Error() string
Error returns a string with an error and a specifics message
Click to show internal directories.
Click to hide internal directories.