Documentation
¶
Overview ¶
Package orchestrator provides functions and stats for container orchestrators
Index ¶
Constants ¶
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 // K8sNetworkPolicy represents a Kubernetes NetworkPolicy K8sNetworkPolicy = 24 // K8sLimitRange represents a Kubernetes LimitRange K8sLimitRange = 25 // K8sStorageClass represents a Kubernetes StorageClass K8sStorageClass = 26 // K8sPodDisruptionBudget represents a Kubernetes PodDisruptionBudget K8sPodDisruptionBudget = 27 // ECSTask represents an ECS Task ECSTask = 150 )
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.
const CheckName = "orchestrator"
CheckName is the cluster check name of the orchestrator check
const NoExpiration = cache.NoExpiration
NoExpiration maps to go-cache corresponding value
Variables ¶
var ExtraLogContext = []interface{}{"check", CheckName}
ExtraLogContext is used to add check name into log context
Functions ¶
func BuildStatsKey ¶
BuildStatsKey builds a orchestrator statsKey prefixed key.
func SetCacheStats ¶
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 ¶
Orchestrator returns the orchestrator name for a node type.
func (NodeType) TelemetryTags ¶
TelemetryTags return tags used for telemetry.