kubelet

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotCompiled is returned if kubelet support is not compiled in.
	// User classes should handle that case as gracefully as possible.
	ErrNotCompiled = errors.New("kubelet support not compiled in")

	// KubePodEntityName is the entity name for Kubernetes pods.
	KubePodEntityName = "kubernetes_pod"

	// KubePodPrefix is the entity prefix for Kubernetes pods
	KubePodPrefix = KubePodEntityName + containers.EntitySeparator

	// KubePodTaggerEntityName is the tagger entity name for Kubernetes pods
	KubePodTaggerEntityName = "kubernetes_pod_uid"

	// KubePodTaggerEntityPrefix is the tagger entity prefix for Kubernetes pods
	KubePodTaggerEntityPrefix = KubePodTaggerEntityName + containers.EntitySeparator
)

Functions

func KubeContainerIDToTaggerEntityID

func KubeContainerIDToTaggerEntityID(ctrID string) (string, error)

KubeContainerIDToTaggerEntityID builds an entity ID from a container ID coming from the pod status (i.e. including the <runtime>:// prefix).

func KubeIDToTaggerEntityID

func KubeIDToTaggerEntityID(entityName string) (string, error)

KubeIDToTaggerEntityID builds a tagger entity ID from an entity ID belonging to a container or pod.

func KubePodUIDToTaggerEntityID

func KubePodUIDToTaggerEntityID(podUID string) (string, error)

KubePodUIDToTaggerEntityID builds an entity ID from a pod UID coming from the pod status (i.e. including the <runtime>:// prefix).

func ParseMetricFromRaw

func ParseMetricFromRaw(raw []byte, metric string) (string, error)

ParseMetricFromRaw parses a metric from raw prometheus text

func PodUIDToEntityName

func PodUIDToEntityName(uid string) string

PodUIDToEntityName returns a prefixed entity name from a pod UID

func PodUIDToTaggerEntityName

func PodUIDToTaggerEntityName(uid string) string

PodUIDToTaggerEntityName returns a prefixed tagger entity name from a pod UID

func TrimRuntimeFromCID

func TrimRuntimeFromCID(cid string) string

TrimRuntimeFromCID takes a full containerID with runtime prefix and only returns the short cID, compatible with a docker container ID

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL