Documentation ¶
Index ¶
- Variables
- func IsNotFoundError(err error) bool
- func NewSummaryMetricsSource(node NodeInfo, client KubeletInterface) sources.MetricSource
- func NewSummaryProvider(nodeLister v1listers.NodeLister, kubeletClient KubeletInterface, ...) sources.MetricSourceProvider
- type ErrNotFound
- type KubeletClientConfig
- type KubeletInterface
- type NodeAddressResolver
- type NodeInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultAddressTypePriority is the default node address type // priority list, as taken from the Kubernetes API server options. // In general, we prefer overrides to others, internal to external, // and DNS to IPs. DefaultAddressTypePriority = []corev1.NodeAddressType{ corev1.NodeHostName, corev1.NodeInternalDNS, corev1.NodeInternalIP, corev1.NodeExternalDNS, corev1.NodeExternalIP, } )
Functions ¶
func IsNotFoundError ¶
func NewSummaryMetricsSource ¶
func NewSummaryMetricsSource(node NodeInfo, client KubeletInterface) sources.MetricSource
func NewSummaryProvider ¶
func NewSummaryProvider(nodeLister v1listers.NodeLister, kubeletClient KubeletInterface, addrResolver NodeAddressResolver) sources.MetricSourceProvider
Types ¶
type ErrNotFound ¶
type ErrNotFound struct {
// contains filtered or unexported fields
}
func (*ErrNotFound) Error ¶
func (err *ErrNotFound) Error() string
type KubeletClientConfig ¶
type KubeletClientConfig struct { Port int RESTConfig *rest.Config DeprecatedCompletelyInsecure bool }
KubeletClientConfig represents configuration for connecting to Kubelets.
func GetKubeletConfig ¶
func GetKubeletConfig(cfg *rest.Config, port int, insecureTLS bool, completelyInsecure bool) *KubeletClientConfig
GetKubeletConfig fetches connection config for connecting to the Kubelet.
type KubeletInterface ¶
type KubeletInterface interface { // GetSummary fetches summary metrics from the given Kubelet GetSummary(ctx context.Context, host string) (*stats.Summary, error) }
KubeletInterface knows how to fetch metrics from the Kubelet
func KubeletClientFor ¶
func KubeletClientFor(config *KubeletClientConfig) (KubeletInterface, error)
KubeletClientFor constructs a new KubeletInterface for the given configuration.
func NewKubeletClient ¶
func NewKubeletClient(transport http.RoundTripper, port int, deprecatedNoTLS bool) (KubeletInterface, error)
type NodeAddressResolver ¶
type NodeAddressResolver interface { // NodeAddress finds the preferred address to use to connect to // the given node. NodeAddress(node *corev1.Node) (address string, err error) }
NodeAddressResolver knows how to find the preferred connection address for a given node.
func NewPriorityNodeAddressResolver ¶
func NewPriorityNodeAddressResolver(typePriority []corev1.NodeAddressType) NodeAddressResolver
NewPriorityNodeAddressResolver creates a new NodeAddressResolver that resolves addresses first based on a list of prioritized address types, then based on address order (first to last) within a particular address type.
Click to show internal directories.
Click to hide internal directories.