Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct { // URL of the Kubelet instance. This will default to `https://<current // node hostname>:10250` if not provided. URL string `yaml:"url"` // Can be `none` for no auth, `tls` for TLS client cert auth, or // `serviceAccount` to use the pod's default service account token to // authenticate. AuthType AuthType `yaml:"authType" default:"none"` // Whether to skip verification of the Kubelet's TLS cert SkipVerify *bool `yaml:"skipVerify" default:"true"` // Path to the CA cert that has signed the Kubelet's TLS cert, unnecessary // if `skipVerify` is set to false. CACertPath string `yaml:"caCertPath"` // Path to the client TLS cert to use if `authType` is set to `tls` ClientCertPath string `yaml:"clientCertPath"` // Path to the client TLS key to use if `authType` is set to `tls` ClientKeyPath string `yaml:"clientKeyPath"` // Whether to log the raw cadvisor response at the debug level for // debugging purposes. LogResponses bool `yaml:"logResponses" default:"false"` }
APIConfig contains config specific to the KubeletAPI
type AuthType ¶
type AuthType string
AuthType to use when connecting to kubelet
const ( // AuthTypeNone means there is no authentication to kubelet AuthTypeNone AuthType = "none" // AuthTypeTLS indicates that client TLS auth is desired AuthTypeTLS AuthType = "tls" // AuthTypeServiceAccount indicates that the default service account token should be used AuthTypeServiceAccount AuthType = "serviceAccount" )
type Client ¶
Client is a wrapper around http.Client that injects the right auth to every request.
func (*Client) DoRequestAndSetValue ¶
DoRequestAndSetValue does a request to the Kubelet and populates the `value` by deserializing the JSON in the response.
Click to show internal directories.
Click to hide internal directories.