Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Podname string Namespace string CACert []byte Token string HttpClient *http.Client // contains filtered or unexported fields }
Client minimal client for the kubernetes API
func (*Client) SetCurrentPodLabel ¶
SetCurrentPodLabel set the label for the current pod in the current namespace (requires patch on pods resource)
func (*Client) SetPodLabel ¶
SetPodLabel sets the label and value for the pod of the given namespace (requires patch on pods resource in the given namespace)
type Config ¶
type Config struct { Host string `env:"KUBERNETES_SERVICE_HOST" envDefault:"localhost"` Port int `env:"KUBERNETES_PORT_443_TCP_PORT" envDefault:"433"` NamespaceFile string `env:"KUBERNETES_NAMESPACE_FILE" envDefault:"/run/secrets/kubernetes.io/serviceaccount/namespace"` CACertFile string `env:"KUBERNETES_API_CA_FILE" envDefault:"/run/secrets/kubernetes.io/serviceaccount/ca.crt"` TokenFile string `env:"KUBERNETES_API_TOKEN_FILE" envDefault:"/run/secrets/kubernetes.io/serviceaccount/token"` }
Config gathers the required kubernetes system configuration to use the kubernetes API
Click to show internal directories.
Click to hide internal directories.