Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ExporterMetricName = "kube_annotations_exporter"
)
Functions ¶
func ResourceMapping ¶
func ResourceMapping(kubeLabelNames, kubeAnnotationsNames []string, maxRevisions int, onlyLabelsAndAnnotations bool, referenceLabels, referenceAnnotations []string) collector.Mapping
ResourceMapping creates the mapping for the prometheus metrics vault. The order of the labels here should match the one from the sample converter function.
func ResourceToSample ¶
func ResourceToSample(resource *unstructured.Unstructured) collector.Sample
ResourceToSample converts Kubernetes unstructured.Unstructured to the prometheus metric sample.
Types ¶
type InformerController ¶
type InformerController struct {
// contains filtered or unexported fields
}
InformerController handles Kubernetes events for resourcess. The is the shim between metrics storage and Kubernetes cluster.
func NewResourcesInformer ¶
func NewResourcesInformer(config *rest.Config, namespaces []string, resources []schema.GroupVersionResource, metricCollector *collector.MetricsVault) (*InformerController, error)
NewResourcesInformer creates cached informer to track resources from a Kubernetes cluster.
Click to show internal directories.
Click to hide internal directories.