Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultAddressTypePriority is the default node address type // priority list, as taken from the Kubernetes API metrics-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 BucketsForScrapeDuration ¶
BucketsForScrapeDuration calculates a variant of the prometheus default histogram buckets that includes relevant buckets around our scrape timeout.
Types ¶
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.