Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientConfig ¶
func GetClientConfig(kubeConfigFile string, overrides *ClientConnectionOverrides) (*rest.Config, error)
GetClientConfig returns the rest.Config for a kubeconfig file
func GetKubeConfigOrInClusterConfig ¶
func GetKubeConfigOrInClusterConfig(kubeConfigFile string, overrides *ClientConnectionOverrides) (*rest.Config, error)
GetKubeConfigOrInClusterConfig loads in-cluster config if kubeConfigFile is empty or the file if not, then applies overrides.
Types ¶
type ClientConnectionOverrides ¶
type ClientConnectionOverrides struct { configv1.ClientConnectionOverrides // MaxIdleConnsPerHost, if non-zero, controls the maximum idle (keep-alive) connections to keep per-host:port. // If zero, DefaultMaxIdleConnsPerHost is used. // TODO roll this into the connection overrides in api MaxIdleConnsPerHost int }
ClientConnectionOverrides allows overriding values for rest.Config not held in a kubeconfig. Most commonly used for QPS. Empty values are not used.
type ClientTransportOverrides ¶
type ClientTransportOverrides struct { WrapTransport func(rt http.RoundTripper) http.RoundTripper MaxIdleConnsPerHost int }
func (ClientTransportOverrides) DefaultClientTransport ¶
func (c ClientTransportOverrides) DefaultClientTransport(rt http.RoundTripper) http.RoundTripper
defaultClientTransport sets defaults for a client Transport that are suitable for use by infrastructure components.
Click to show internal directories.
Click to hide internal directories.