orchestrator

package module
v0.52.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package orchestrator provides functions and stats for container orchestrators

Index

Constants

View Source
const (
	// K8sUnsetType represents a Kubernetes unset type
	K8sUnsetType NodeType = 0
	// K8sPod represents a Kubernetes Pod
	K8sPod = 1
	// K8sReplicaSet represents a Kubernetes ReplicaSet
	K8sReplicaSet = 2
	// K8sService represents a Kubernetes Service
	K8sService = 3
	// K8sNode represents a Kubernetes Node
	K8sNode = 4
	// K8sCluster represents a Kubernetes Cluster
	K8sCluster = 5
	// K8sJob represents a Kubernetes Job
	K8sJob = 6
	// K8sCronJob represents a Kubernetes CronJob
	K8sCronJob = 7
	// K8sDaemonSet represents a Kubernetes DaemonSet
	K8sDaemonSet = 8
	// K8sStatefulSet represents a Kubernetes StatefulSet
	K8sStatefulSet = 9
	// K8sPersistentVolume represents a Kubernetes PersistentVolume
	K8sPersistentVolume = 10
	// K8sPersistentVolumeClaim represents a Kubernetes PersistentVolumeClaim
	K8sPersistentVolumeClaim = 11
	// K8sRole represents a Kubernetes Role
	K8sRole = 12
	// K8sRoleBinding represents a Kubernetes RoleBinding
	K8sRoleBinding = 13
	// K8sClusterRole represents a Kubernetes ClusterRole
	K8sClusterRole = 14
	// K8sClusterRoleBinding represents a Kubernetes ClusterRoleBinding
	K8sClusterRoleBinding = 15
	// K8sServiceAccount represents a Kubernetes ServiceAccount
	K8sServiceAccount = 16
	// K8sIngress represents a Kubernetes Ingress
	K8sIngress = 17
	// K8sDeployment represents a Kubernetes Deployment
	K8sDeployment = 18
	// K8sNamespace represents a Kubernetes Namespace
	K8sNamespace = 19
	// K8sCRD represents a Kubernetes CRD
	K8sCRD = 20
	// K8sCR represents a Kubernetes CR
	K8sCR = 21
	// K8sVerticalPodAutoscaler represents a Kubernetes VerticalPod Autoscaler
	K8sVerticalPodAutoscaler = 22
	// K8sHorizontalPodAutoscaler represents a Kubernetes Horizontal Pod Autoscaler
	K8sHorizontalPodAutoscaler = 23
)

The values in these enfms should match the values defined in the agent payload schema, defined here: https://github.com/DataDog/agent-payload/blob/master/proto/process/agent.proto (within enum K8sResource) we do not utilize iota as these types are used in external systems, not just within the agent instance.

View Source
const CheckName = "orchestrator"

CheckName is the cluster check name of the orchestrator check

View Source
const NoExpiration = cache.NoExpiration

NoExpiration maps to go-cache corresponding value

Variables

View Source
var ExtraLogContext = []interface{}{"check", CheckName}

ExtraLogContext is used to add check name into log context

Functions

func BuildStatsKey

func BuildStatsKey(nodeType NodeType) string

BuildStatsKey builds a orchestrator statsKey prefixed key.

func SetCacheStats

func SetCacheStats(resourceListLen int, resourceMsgLen int, nodeType NodeType, ca *cache.Cache)

SetCacheStats sets the cache stats for each resource

Types

type CheckStats

type CheckStats struct {
	// CacheHits contains the number of cache hits for a NodeType per run.
	CacheHits int

	// CacheMiss contains the number of cache miss/send Data for a NodeType per run.
	CacheMiss int

	NodeType
}

CheckStats holds statistics for the DCA status command regarding the last run check. Information is saved in the KubernetesResourceCache.

type NodeType

type NodeType int

NodeType represents a kind of resource used by a container orchestrator.

func NodeTypes

func NodeTypes() []NodeType

NodeTypes returns the current existing NodesTypes as a slice to iterate over.

func (NodeType) Orchestrator

func (n NodeType) Orchestrator() string

Orchestrator returns the orchestrator name for a node type.

func (NodeType) String

func (n NodeType) String() string

func (NodeType) TelemetryTags

func (n NodeType) TelemetryTags() []string

TelemetryTags return tags used for telemetry.

Jump to

Keyboard shortcuts

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