Documentation
¶
Overview ¶
internal/collector/argo_rollouts_collector.go
internal/collector/clusterrole_collector.go
internal/collector/clusterrolebinding_collector.go
internal/collector/container_resource_collector.go
internal/collector/cronjob_collector.go
internal/collector/csinode_collector.go
internal/collector/daemonset_collector.go
internal/collector/datadog_collector.go
internal/collector/deployment_collector.go
internal/collector/endpoints_collector.go
internal/collector/event_collector.go
internal/collector/horizontalpodautoscaler_collector.go
internal/collector/ingress_collector.go
internal/collector/ingressclass_collector.go
internal/collector/interface.go
internal/collector/job_collector.go
internal/collector/karpenter_collector.go
internal/collector/scaledjob_collector.go
internal/collector/scaledobject_collector.go
internal/collector/kubeflow_notebook_collector.go
internal/collector/limitrange_collector.go
internal/collector/manager.go
Package collector provides functionality for collecting metrics from Kubernetes resources ¶
internal/collector/namespace_collector.go
internal/collector/networkpolicy_collector.go
internal/collector/node_collector.go
internal/collector/persistentvolume_collector.go
internal/collector/pod_collector.go
internal/collector/poddisruptionbudget_collector.go
internal/collector/pvc_collector.go
internal/collector/replicaset_collector.go
internal/collector/replicationcontroller_collector.go
internal/collector/resourcequota_collector.go
internal/collector/role_collector.go
internal/collector/rolebinding_collector.go
internal/collector/scheduled_spark_application_collector.go
internal/collector/service_collector.go
internal/collector/serviceaccount_collector.go
internal/collector/spark_application_collector.go
internal/collector/statefulset_collector.go
internal/collector/storageclass_collector.go
internal/collector/verticalpodautoscaler_collector.go
internal/collector/volcano_job_collector.go
internal/collector/workload_recommendation_collector.go
Index ¶
- Constants
- func NewPrometheusClient(metrics *TelemetryMetrics) *http.Client
- type ArgoRolloutsCollector
- func (c *ArgoRolloutsCollector) AddResource(resource interface{}) error
- func (c *ArgoRolloutsCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ArgoRolloutsCollector) GetType() string
- func (c *ArgoRolloutsCollector) IsAvailable(ctx context.Context) bool
- func (c *ArgoRolloutsCollector) Start(ctx context.Context) error
- func (c *ArgoRolloutsCollector) Stop() error
- type CNPGCollector
- func (c *CNPGCollector) AddResource(resource interface{}) error
- func (c *CNPGCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *CNPGCollector) GetType() string
- func (c *CNPGCollector) IsAvailable(ctx context.Context) bool
- func (c *CNPGCollector) Start(ctx context.Context) error
- func (c *CNPGCollector) Stop() error
- type CRDCollector
- func (c *CRDCollector) AddResource(resource interface{}) error
- func (c *CRDCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *CRDCollector) GetType() string
- func (c *CRDCollector) IsAvailable(ctx context.Context) bool
- func (c *CRDCollector) Start(ctx context.Context) error
- func (c *CRDCollector) Stop() error
- type CSIDriverCollector
- func (c *CSIDriverCollector) AddResource(resource interface{}) error
- func (c *CSIDriverCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *CSIDriverCollector) GetType() string
- func (c *CSIDriverCollector) IsAvailable(ctx context.Context) bool
- func (c *CSIDriverCollector) Start(ctx context.Context) error
- func (c *CSIDriverCollector) Stop() error
- type CSINodeCollector
- func (c *CSINodeCollector) AddResource(resource interface{}) error
- func (c *CSINodeCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *CSINodeCollector) GetType() string
- func (c *CSINodeCollector) IsAvailable(ctx context.Context) bool
- func (c *CSINodeCollector) Start(ctx context.Context) error
- func (c *CSINodeCollector) Stop() error
- type CSIStorageCapacityCollector
- func (c *CSIStorageCapacityCollector) AddResource(resource interface{}) error
- func (c *CSIStorageCapacityCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *CSIStorageCapacityCollector) GetType() string
- func (c *CSIStorageCapacityCollector) IsAvailable(ctx context.Context) bool
- func (c *CSIStorageCapacityCollector) Start(ctx context.Context) error
- func (c *CSIStorageCapacityCollector) Stop() error
- type ChangeDetectionHelper
- type ChangeDetectionStatus
- type ClusterCollector
- func (c *ClusterCollector) AddResource(resource interface{}) error
- func (c *ClusterCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ClusterCollector) GetType() string
- func (c *ClusterCollector) IsAvailable(ctx context.Context) bool
- func (c *ClusterCollector) Start(ctx context.Context) error
- func (c *ClusterCollector) Stop() error
- type ClusterRoleBindingCollector
- func (c *ClusterRoleBindingCollector) AddResource(resource interface{}) error
- func (c *ClusterRoleBindingCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ClusterRoleBindingCollector) GetType() string
- func (c *ClusterRoleBindingCollector) IsAvailable(ctx context.Context) bool
- func (c *ClusterRoleBindingCollector) Start(ctx context.Context) error
- func (c *ClusterRoleBindingCollector) Stop() error
- type ClusterRoleCollector
- func (c *ClusterRoleCollector) AddResource(resource interface{}) error
- func (c *ClusterRoleCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ClusterRoleCollector) GetType() string
- func (c *ClusterRoleCollector) IsAvailable(ctx context.Context) bool
- func (c *ClusterRoleCollector) Start(ctx context.Context) error
- func (c *ClusterRoleCollector) Stop() error
- type CollectedResource
- type CollectionConfig
- type CollectionManager
- func (m *CollectionManager) DeregisterCollector(collectorType string) error
- func (m *CollectionManager) GetCollector(collectorType string) ResourceCollector
- func (m *CollectionManager) GetCollectorTypes() []string
- func (m *CollectionManager) GetCombinedChannel() <-chan []CollectedResource
- func (m *CollectionManager) IsCollectorRunning(collectorType string) bool
- func (m *CollectionManager) RegisterCollector(collector ResourceCollector) error
- func (m *CollectionManager) StartAll(ctx context.Context) error
- func (m *CollectionManager) StartCollector(ctx context.Context, collectorType string) error
- func (m *CollectionManager) StopAll() error
- func (m *CollectionManager) StopCollector(collectorType string) error
- type ContainerMetricsSnapshot
- type ContainerResourceCollector
- func (c *ContainerResourceCollector) AddResource(resource interface{}) error
- func (c *ContainerResourceCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ContainerResourceCollector) GetType() string
- func (c *ContainerResourceCollector) IsAvailable(ctx context.Context) bool
- func (c *ContainerResourceCollector) Start(ctx context.Context) error
- func (c *ContainerResourceCollector) Stop() error
- type ContainerResourceCollectorConfig
- type CronJobCollector
- func (c *CronJobCollector) AddResource(resource interface{}) error
- func (c *CronJobCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *CronJobCollector) GetType() string
- func (c *CronJobCollector) IsAvailable(ctx context.Context) bool
- func (c *CronJobCollector) Start(ctx context.Context) error
- func (c *CronJobCollector) Stop() error
- type DaemonSetCollector
- func (c *DaemonSetCollector) AddResource(resource interface{}) error
- func (c *DaemonSetCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *DaemonSetCollector) GetType() string
- func (c *DaemonSetCollector) IsAvailable(ctx context.Context) bool
- func (c *DaemonSetCollector) Start(ctx context.Context) error
- func (c *DaemonSetCollector) Stop() error
- type DatadogCollector
- func (c *DatadogCollector) AddResource(resource interface{}) error
- func (c *DatadogCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *DatadogCollector) GetType() string
- func (c *DatadogCollector) IsAvailable(ctx context.Context) bool
- func (c *DatadogCollector) Start(ctx context.Context) error
- func (c *DatadogCollector) Stop() error
- type DeploymentCollector
- func (c *DeploymentCollector) AddResource(resource interface{}) error
- func (c *DeploymentCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *DeploymentCollector) GetType() string
- func (c *DeploymentCollector) IsAvailable(ctx context.Context) bool
- func (c *DeploymentCollector) Start(ctx context.Context) error
- func (c *DeploymentCollector) Stop() error
- type EndpointCollector
- func (c *EndpointCollector) AddResource(resource interface{}) error
- func (c *EndpointCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *EndpointCollector) GetType() string
- func (c *EndpointCollector) IsAvailable(ctx context.Context) bool
- func (c *EndpointCollector) Start(ctx context.Context) error
- func (c *EndpointCollector) Stop() error
- type EventCollector
- func (c *EventCollector) AddResource(resource interface{}) error
- func (c *EventCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *EventCollector) GetType() string
- func (c *EventCollector) IsAvailable(ctx context.Context) bool
- func (c *EventCollector) Start(ctx context.Context) error
- func (c *EventCollector) Stop() error
- type EventType
- type ExcludedArgoRollout
- type ExcludedCNPGCluster
- type ExcludedCSIStorageCapacity
- type ExcludedCronJob
- type ExcludedDaemonSet
- type ExcludedDatadogExtendedDaemonSetReplicaSet
- type ExcludedDeployment
- type ExcludedEndpoint
- type ExcludedEvent
- type ExcludedHPA
- type ExcludedIngress
- type ExcludedJob
- type ExcludedKubeflowNotebook
- type ExcludedLimitRange
- type ExcludedNetworkPolicy
- type ExcludedPDB
- type ExcludedPVC
- type ExcludedPod
- type ExcludedReplicaSet
- type ExcludedReplicationController
- type ExcludedResourceQuota
- type ExcludedRole
- type ExcludedRoleBinding
- type ExcludedScaledJob
- type ExcludedScaledObject
- type ExcludedScheduledSparkApplication
- type ExcludedService
- type ExcludedServiceAccount
- type ExcludedSparkApplication
- type ExcludedStatefulSet
- type ExcludedVPA
- type ExcludedVolcanoJob
- type HistoricalMetricsCollector
- func (c *HistoricalMetricsCollector) DiscoverContainers(ctx context.Context, namespace, podRegex string) ([]string, error)
- func (c *HistoricalMetricsCollector) FetchPercentiles(ctx context.Context, workload HistoricalWorkloadQuery) (*gen.HistoricalMetricsSummary, error)
- func (c *HistoricalMetricsCollector) FetchPercentilesForAll(ctx context.Context, workloads []HistoricalWorkloadQuery) map[string]*gen.HistoricalMetricsSummary
- type HistoricalWorkloadQuery
- type HorizontalPodAutoscalerCollector
- func (c *HorizontalPodAutoscalerCollector) AddResource(resource interface{}) error
- func (c *HorizontalPodAutoscalerCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *HorizontalPodAutoscalerCollector) GetType() string
- func (c *HorizontalPodAutoscalerCollector) IsAvailable(ctx context.Context) bool
- func (c *HorizontalPodAutoscalerCollector) Start(ctx context.Context) error
- func (c *HorizontalPodAutoscalerCollector) Stop() error
- type IngressClassCollector
- func (c *IngressClassCollector) AddResource(resource interface{}) error
- func (c *IngressClassCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *IngressClassCollector) GetType() string
- func (c *IngressClassCollector) IsAvailable(ctx context.Context) bool
- func (c *IngressClassCollector) Start(ctx context.Context) error
- func (c *IngressClassCollector) Stop() error
- type IngressCollector
- func (c *IngressCollector) AddResource(resource interface{}) error
- func (c *IngressCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *IngressCollector) GetType() string
- func (c *IngressCollector) IsAvailable(ctx context.Context) bool
- func (c *IngressCollector) Start(ctx context.Context) error
- func (c *IngressCollector) Stop() error
- type JobCollector
- func (c *JobCollector) AddResource(resource interface{}) error
- func (c *JobCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *JobCollector) GetType() string
- func (c *JobCollector) IsAvailable(ctx context.Context) bool
- func (c *JobCollector) Start(ctx context.Context) error
- func (c *JobCollector) Stop() error
- type KarpenterCollector
- func (c *KarpenterCollector) AddResource(resource interface{}) error
- func (c *KarpenterCollector) ExcludeResource(resourceType, namespace, name string)
- func (c *KarpenterCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *KarpenterCollector) GetType() string
- func (c *KarpenterCollector) IsAvailable(ctx context.Context) bool
- func (c *KarpenterCollector) Start(ctx context.Context) error
- func (c *KarpenterCollector) Stop() error
- type KarpenterResource
- type KubeflowNotebookCollector
- func (c *KubeflowNotebookCollector) AddResource(resource interface{}) error
- func (c *KubeflowNotebookCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *KubeflowNotebookCollector) GetType() string
- func (c *KubeflowNotebookCollector) IsAvailable(ctx context.Context) bool
- func (c *KubeflowNotebookCollector) Start(ctx context.Context) error
- func (c *KubeflowNotebookCollector) Stop() error
- type LimitRangeCollector
- func (c *LimitRangeCollector) AddResource(resource interface{}) error
- func (c *LimitRangeCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *LimitRangeCollector) GetType() string
- func (c *LimitRangeCollector) IsAvailable(ctx context.Context) bool
- func (c *LimitRangeCollector) Start(ctx context.Context) error
- func (c *LimitRangeCollector) Stop() error
- type NamespaceCollector
- func (c *NamespaceCollector) AddResource(resource interface{}) error
- func (c *NamespaceCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *NamespaceCollector) GetType() string
- func (c *NamespaceCollector) IsAvailable(ctx context.Context) bool
- func (c *NamespaceCollector) Start(ctx context.Context) error
- func (c *NamespaceCollector) Stop() error
- type NetworkPolicyCollector
- func (c *NetworkPolicyCollector) AddResource(resource interface{}) error
- func (c *NetworkPolicyCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *NetworkPolicyCollector) GetType() string
- func (c *NetworkPolicyCollector) IsAvailable(ctx context.Context) bool
- func (c *NetworkPolicyCollector) Start(ctx context.Context) error
- func (c *NetworkPolicyCollector) Stop() error
- type NodeCollector
- func (c *NodeCollector) AddResource(resource interface{}) error
- func (c *NodeCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *NodeCollector) GetType() string
- func (c *NodeCollector) IsAvailable(ctx context.Context) bool
- func (c *NodeCollector) Start(ctx context.Context) error
- func (c *NodeCollector) Stop() error
- type NodeCollectorConfig
- type PersistentVolumeClaimCollector
- func (c *PersistentVolumeClaimCollector) AddResource(resource interface{}) error
- func (c *PersistentVolumeClaimCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *PersistentVolumeClaimCollector) GetType() string
- func (c *PersistentVolumeClaimCollector) IsAvailable(ctx context.Context) bool
- func (c *PersistentVolumeClaimCollector) Start(ctx context.Context) error
- func (c *PersistentVolumeClaimCollector) Stop() error
- type PersistentVolumeClaimMetricsCollector
- func (c *PersistentVolumeClaimMetricsCollector) AddResource(resource interface{}) error
- func (c *PersistentVolumeClaimMetricsCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *PersistentVolumeClaimMetricsCollector) GetType() string
- func (c *PersistentVolumeClaimMetricsCollector) IsAvailable(ctx context.Context) bool
- func (c *PersistentVolumeClaimMetricsCollector) Start(ctx context.Context) error
- func (c *PersistentVolumeClaimMetricsCollector) Stop() error
- type PersistentVolumeClaimMetricsCollectorConfig
- type PersistentVolumeClaimMetricsSnapshot
- type PersistentVolumeCollector
- func (c *PersistentVolumeCollector) AddResource(resource interface{}) error
- func (c *PersistentVolumeCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *PersistentVolumeCollector) GetType() string
- func (c *PersistentVolumeCollector) IsAvailable(ctx context.Context) bool
- func (c *PersistentVolumeCollector) Start(ctx context.Context) error
- func (c *PersistentVolumeCollector) Stop() error
- type PodCollector
- func (c *PodCollector) AddResource(resource interface{}) error
- func (c *PodCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *PodCollector) GetType() string
- func (c *PodCollector) IsAvailable(ctx context.Context) bool
- func (c *PodCollector) Start(ctx context.Context) error
- func (c *PodCollector) Stop() error
- type PodDisruptionBudgetCollector
- func (c *PodDisruptionBudgetCollector) AddResource(resource interface{}) error
- func (c *PodDisruptionBudgetCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *PodDisruptionBudgetCollector) GetType() string
- func (c *PodDisruptionBudgetCollector) IsAvailable(ctx context.Context) bool
- func (c *PodDisruptionBudgetCollector) Start(ctx context.Context) error
- func (c *PodDisruptionBudgetCollector) Stop() error
- type PrometheusRoundTripper
- type ReplicaSetCollector
- func (c *ReplicaSetCollector) AddResource(resource interface{}) error
- func (c *ReplicaSetCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ReplicaSetCollector) GetType() string
- func (c *ReplicaSetCollector) IsAvailable(ctx context.Context) bool
- func (c *ReplicaSetCollector) Start(ctx context.Context) error
- func (c *ReplicaSetCollector) Stop() error
- type ReplicationControllerCollector
- func (c *ReplicationControllerCollector) AddResource(resource interface{}) error
- func (c *ReplicationControllerCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ReplicationControllerCollector) GetType() string
- func (c *ReplicationControllerCollector) IsAvailable(ctx context.Context) bool
- func (c *ReplicationControllerCollector) Start(ctx context.Context) error
- func (c *ReplicationControllerCollector) Stop() error
- type ResettableCollector
- type ResourceCollector
- type ResourceQuotaCollector
- func (c *ResourceQuotaCollector) AddResource(resource interface{}) error
- func (c *ResourceQuotaCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ResourceQuotaCollector) GetType() string
- func (c *ResourceQuotaCollector) IsAvailable(ctx context.Context) bool
- func (c *ResourceQuotaCollector) Start(ctx context.Context) error
- func (c *ResourceQuotaCollector) Stop() error
- type ResourceType
- type ResourcesBatcher
- type RoleBindingCollector
- func (c *RoleBindingCollector) AddResource(resource interface{}) error
- func (c *RoleBindingCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *RoleBindingCollector) GetType() string
- func (c *RoleBindingCollector) IsAvailable(ctx context.Context) bool
- func (c *RoleBindingCollector) Start(ctx context.Context) error
- func (c *RoleBindingCollector) Stop() error
- type RoleCollector
- func (c *RoleCollector) AddResource(resource interface{}) error
- func (c *RoleCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *RoleCollector) GetType() string
- func (c *RoleCollector) IsAvailable(ctx context.Context) bool
- func (c *RoleCollector) Start(ctx context.Context) error
- func (c *RoleCollector) Stop() error
- type ScaledJobCollector
- func (c *ScaledJobCollector) AddResource(resource interface{}) error
- func (c *ScaledJobCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ScaledJobCollector) GetType() string
- func (c *ScaledJobCollector) IsAvailable(ctx context.Context) bool
- func (c *ScaledJobCollector) Start(ctx context.Context) error
- func (c *ScaledJobCollector) Stop() error
- type ScaledObjectCollector
- func (c *ScaledObjectCollector) AddResource(resource interface{}) error
- func (c *ScaledObjectCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ScaledObjectCollector) GetType() string
- func (c *ScaledObjectCollector) IsAvailable(ctx context.Context) bool
- func (c *ScaledObjectCollector) Start(ctx context.Context) error
- func (c *ScaledObjectCollector) Stop() error
- type ScheduledSparkApplicationCollector
- func (c *ScheduledSparkApplicationCollector) AddResource(resource interface{}) error
- func (c *ScheduledSparkApplicationCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ScheduledSparkApplicationCollector) GetType() string
- func (c *ScheduledSparkApplicationCollector) IsAvailable(ctx context.Context) bool
- func (c *ScheduledSparkApplicationCollector) Start(ctx context.Context) error
- func (c *ScheduledSparkApplicationCollector) Stop() error
- type ServiceAccountCollector
- func (c *ServiceAccountCollector) AddResource(resource interface{}) error
- func (c *ServiceAccountCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ServiceAccountCollector) GetType() string
- func (c *ServiceAccountCollector) IsAvailable(ctx context.Context) bool
- func (c *ServiceAccountCollector) Start(ctx context.Context) error
- func (c *ServiceAccountCollector) Stop() error
- type ServiceCollector
- func (c *ServiceCollector) AddResource(resource interface{}) error
- func (c *ServiceCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *ServiceCollector) GetType() string
- func (c *ServiceCollector) IsAvailable(ctx context.Context) bool
- func (c *ServiceCollector) Start(ctx context.Context) error
- func (c *ServiceCollector) Stop() error
- type SparkApplicationCollector
- func (c *SparkApplicationCollector) AddResource(resource interface{}) error
- func (c *SparkApplicationCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *SparkApplicationCollector) GetType() string
- func (c *SparkApplicationCollector) IsAvailable(ctx context.Context) bool
- func (c *SparkApplicationCollector) Start(ctx context.Context) error
- func (c *SparkApplicationCollector) Stop() error
- type StatefulSetCollector
- func (c *StatefulSetCollector) AddResource(resource interface{}) error
- func (c *StatefulSetCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *StatefulSetCollector) GetType() string
- func (c *StatefulSetCollector) IsAvailable(ctx context.Context) bool
- func (c *StatefulSetCollector) Start(ctx context.Context) error
- func (c *StatefulSetCollector) Stop() error
- type StorageClassCollector
- func (c *StorageClassCollector) AddResource(resource interface{}) error
- func (c *StorageClassCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *StorageClassCollector) GetType() string
- func (c *StorageClassCollector) IsAvailable(ctx context.Context) bool
- func (c *StorageClassCollector) Start(ctx context.Context) error
- func (c *StorageClassCollector) Stop() error
- type TelemetryMetrics
- type VerticalPodAutoscalerCollector
- func (c *VerticalPodAutoscalerCollector) AddResource(resource interface{}) error
- func (c *VerticalPodAutoscalerCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *VerticalPodAutoscalerCollector) GetType() string
- func (c *VerticalPodAutoscalerCollector) IsAvailable(ctx context.Context) bool
- func (c *VerticalPodAutoscalerCollector) Start(ctx context.Context) error
- func (c *VerticalPodAutoscalerCollector) Stop() error
- type VolcanoJobCollector
- func (c *VolcanoJobCollector) AddResource(resource interface{}) error
- func (c *VolcanoJobCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *VolcanoJobCollector) GetType() string
- func (c *VolcanoJobCollector) IsAvailable(ctx context.Context) bool
- func (c *VolcanoJobCollector) Start(ctx context.Context) error
- func (c *VolcanoJobCollector) Stop() error
- type VolumeAttachmentCollector
- func (c *VolumeAttachmentCollector) AddResource(resource interface{}) error
- func (c *VolumeAttachmentCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *VolumeAttachmentCollector) GetType() string
- func (c *VolumeAttachmentCollector) IsAvailable(ctx context.Context) bool
- func (c *VolumeAttachmentCollector) Start(ctx context.Context) error
- func (c *VolumeAttachmentCollector) Stop() error
- type WorkloadRecommendationCollector
- func (c *WorkloadRecommendationCollector) AddResource(resource interface{}) error
- func (c *WorkloadRecommendationCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *WorkloadRecommendationCollector) GetType() string
- func (c *WorkloadRecommendationCollector) IsAvailable(ctx context.Context) bool
- func (c *WorkloadRecommendationCollector) Start(ctx context.Context) error
- func (c *WorkloadRecommendationCollector) Stop() error
- type WorkloadRuleCollector
- func (c *WorkloadRuleCollector) AddResource(resource interface{}) error
- func (c *WorkloadRuleCollector) GetResourceChannel() <-chan []CollectedResource
- func (c *WorkloadRuleCollector) GetType() string
- func (c *WorkloadRuleCollector) IsAvailable(ctx context.Context) bool
- func (c *WorkloadRuleCollector) Start(ctx context.Context) error
- func (c *WorkloadRuleCollector) Stop() error
Constants ¶
const ( // DefaultBatchSize is the default maximum number of resources in a batch. DefaultBatchSize = 50 // DefaultMaxBatchSize is the maximum number the batch size will grow to. DefaultMaxBatchSize = 1000 // DefaultMaxBatchTime is the default maximum time duration before sending a batch. DefaultMaxBatchTime = 5 * time.Second )
const (
KUBE_SYSTEM_NS = "kube-system"
)
Variables ¶
This section is empty.
Functions ¶
func NewPrometheusClient ¶
func NewPrometheusClient(metrics *TelemetryMetrics) *http.Client
NewPrometheusClient creates a new Prometheus HTTP client with metrics and compression
Types ¶
type ArgoRolloutsCollector ¶
type ArgoRolloutsCollector struct {
// contains filtered or unexported fields
}
ArgoRolloutsCollector watches for Argo Rollouts resources
func NewArgoRolloutsCollector ¶
func NewArgoRolloutsCollector( dynamicClient dynamic.Interface, namespaces []string, excludedRollouts []ExcludedArgoRollout, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ArgoRolloutsCollector
NewArgoRolloutsCollector creates a new collector for Argo Rollouts resources
func (*ArgoRolloutsCollector) AddResource ¶
func (c *ArgoRolloutsCollector) AddResource(resource interface{}) error
AddResource manually adds an Argo Rollout resource to be processed by the collector
func (*ArgoRolloutsCollector) GetResourceChannel ¶
func (c *ArgoRolloutsCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ArgoRolloutsCollector) GetType ¶
func (c *ArgoRolloutsCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ArgoRolloutsCollector) IsAvailable ¶
func (c *ArgoRolloutsCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Argo Rollouts resources can be accessed in the cluster
func (*ArgoRolloutsCollector) Start ¶
func (c *ArgoRolloutsCollector) Start(ctx context.Context) error
Start begins the Argo Rollouts resources collection process
func (*ArgoRolloutsCollector) Stop ¶
func (c *ArgoRolloutsCollector) Stop() error
Stop gracefully shuts down the Argo Rollouts collector
type CNPGCollector ¶ added in v0.0.66
type CNPGCollector struct {
// contains filtered or unexported fields
}
CNPGCollector watches for CloudNativePG Cluster CRD resources
func NewCNPGCollector ¶ added in v0.0.66
func NewCNPGCollector( dynamicClient dynamic.Interface, namespaces []string, excludedClusters []ExcludedCNPGCluster, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *CNPGCollector
NewCNPGCollector creates a new collector for CloudNativePG Cluster resources
func (*CNPGCollector) AddResource ¶ added in v0.0.66
func (c *CNPGCollector) AddResource(resource interface{}) error
AddResource manually adds a CNPG Cluster resource to be processed
func (*CNPGCollector) GetResourceChannel ¶ added in v0.0.66
func (c *CNPGCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*CNPGCollector) GetType ¶ added in v0.0.66
func (c *CNPGCollector) GetType() string
GetType returns the type of resource this collector handles
func (*CNPGCollector) IsAvailable ¶ added in v0.0.66
func (c *CNPGCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if CNPG Cluster CRDs exist in the cluster
func (*CNPGCollector) Start ¶ added in v0.0.66
func (c *CNPGCollector) Start(ctx context.Context) error
Start begins watching CloudNativePG Cluster resources
func (*CNPGCollector) Stop ¶ added in v0.0.66
func (c *CNPGCollector) Stop() error
Stop gracefully shuts down the CNPG collector
type CRDCollector ¶
type CRDCollector struct {
// contains filtered or unexported fields
}
func NewCRDCollector ¶
func NewCRDCollector( client apiextclientset.Interface, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *CRDCollector
func (*CRDCollector) AddResource ¶
func (c *CRDCollector) AddResource(resource interface{}) error
AddResource manually adds a CRD resource to be processed by the collector
func (*CRDCollector) GetResourceChannel ¶
func (c *CRDCollector) GetResourceChannel() <-chan []CollectedResource
func (*CRDCollector) GetType ¶
func (c *CRDCollector) GetType() string
func (*CRDCollector) IsAvailable ¶
func (c *CRDCollector) IsAvailable(ctx context.Context) bool
func (*CRDCollector) Stop ¶
func (c *CRDCollector) Stop() error
type CSIDriverCollector ¶
type CSIDriverCollector struct {
// contains filtered or unexported fields
}
CSIDriverCollector watches for CSIDriver events and collects CSIDriver data
func NewCSIDriverCollector ¶
func NewCSIDriverCollector( client kubernetes.Interface, excludedCSIDrivers []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *CSIDriverCollector
NewCSIDriverCollector creates a new collector for CSIDriver resources
func (*CSIDriverCollector) AddResource ¶
func (c *CSIDriverCollector) AddResource(resource interface{}) error
AddResource manually adds a CSIDriver resource to be processed by the collector
func (*CSIDriverCollector) GetResourceChannel ¶
func (c *CSIDriverCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*CSIDriverCollector) GetType ¶
func (c *CSIDriverCollector) GetType() string
GetType returns the type of resource this collector handles
func (*CSIDriverCollector) IsAvailable ¶
func (c *CSIDriverCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if CSIDriver resources are available in the cluster
func (*CSIDriverCollector) Start ¶
func (c *CSIDriverCollector) Start(ctx context.Context) error
Start begins the CSIDriver collection process
func (*CSIDriverCollector) Stop ¶
func (c *CSIDriverCollector) Stop() error
Stop gracefully shuts down the CSIDriver collector
type CSINodeCollector ¶
type CSINodeCollector struct {
// contains filtered or unexported fields
}
CSINodeCollector watches for CSINode events and collects CSINode data
func NewCSINodeCollector ¶
func NewCSINodeCollector( client kubernetes.Interface, excludedNodes []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *CSINodeCollector
NewCSINodeCollector creates a new collector for CSINode resources
func (*CSINodeCollector) AddResource ¶
func (c *CSINodeCollector) AddResource(resource interface{}) error
AddResource manually adds a CSINode resource to be processed by the collector
func (*CSINodeCollector) GetResourceChannel ¶
func (c *CSINodeCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*CSINodeCollector) GetType ¶
func (c *CSINodeCollector) GetType() string
GetType returns the type of resource this collector handles
func (*CSINodeCollector) IsAvailable ¶
func (c *CSINodeCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if CSINode resources can be accessed in the cluster
func (*CSINodeCollector) Start ¶
func (c *CSINodeCollector) Start(ctx context.Context) error
Start begins the CSINode collection process
func (*CSINodeCollector) Stop ¶
func (c *CSINodeCollector) Stop() error
Stop gracefully shuts down the CSINode collector
type CSIStorageCapacityCollector ¶
type CSIStorageCapacityCollector struct {
// contains filtered or unexported fields
}
CSIStorageCapacityCollector watches for CSIStorageCapacity events and collects CSIStorageCapacity data
func NewCSIStorageCapacityCollector ¶
func NewCSIStorageCapacityCollector( client kubernetes.Interface, namespaces []string, excludedCSIStorageCapacities []ExcludedCSIStorageCapacity, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *CSIStorageCapacityCollector
NewCSIStorageCapacityCollector creates a new collector for CSIStorageCapacity resources
func (*CSIStorageCapacityCollector) AddResource ¶
func (c *CSIStorageCapacityCollector) AddResource(resource interface{}) error
AddResource manually adds a CSI storage capacity resource to be processed by the collector
func (*CSIStorageCapacityCollector) GetResourceChannel ¶
func (c *CSIStorageCapacityCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*CSIStorageCapacityCollector) GetType ¶
func (c *CSIStorageCapacityCollector) GetType() string
GetType returns the type of resource this collector handles
func (*CSIStorageCapacityCollector) IsAvailable ¶
func (c *CSIStorageCapacityCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if CSIStorageCapacity resources can be accessed in the cluster
func (*CSIStorageCapacityCollector) Start ¶
func (c *CSIStorageCapacityCollector) Start(ctx context.Context) error
Start begins the CSIStorageCapacity collection process
func (*CSIStorageCapacityCollector) Stop ¶
func (c *CSIStorageCapacityCollector) Stop() error
Stop gracefully shuts down the CSIStorageCapacity collector
type ChangeDetectionHelper ¶
type ChangeDetectionHelper struct {
// contains filtered or unexported fields
}
type ChangeDetectionStatus ¶
type ChangeDetectionStatus string
const ( IgnoreChanges ChangeDetectionStatus = "IgnoreChanges" PushChanges ChangeDetectionStatus = "PushChanges" UnknownChanges ChangeDetectionStatus = "UnknownChanges" )
type ClusterCollector ¶
type ClusterCollector struct {
// contains filtered or unexported fields
}
ClusterCollector collects comprehensive cluster information
func NewClusterCollector ¶
func NewClusterCollector( k8sClient kubernetes.Interface, metricsClient metricsv1.Interface, provider provider.Provider, updateInterval time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ClusterCollector
NewClusterCollector creates a new collector for cluster data
func (*ClusterCollector) AddResource ¶
func (c *ClusterCollector) AddResource(resource interface{}) error
AddResource manually adds a cluster resource - not supported for cluster collector
func (*ClusterCollector) GetResourceChannel ¶
func (c *ClusterCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resources
func (*ClusterCollector) GetType ¶
func (c *ClusterCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ClusterCollector) IsAvailable ¶
func (c *ClusterCollector) IsAvailable(ctx context.Context) bool
IsAvailable returns true if the collector is available
func (*ClusterCollector) Start ¶
func (c *ClusterCollector) Start(ctx context.Context) error
Start begins the cluster data collection process
func (*ClusterCollector) Stop ¶
func (c *ClusterCollector) Stop() error
Stop gracefully shuts down the collector
type ClusterRoleBindingCollector ¶
type ClusterRoleBindingCollector struct {
// contains filtered or unexported fields
}
ClusterRoleBindingCollector watches for ClusterRoleBinding events and collects ClusterRoleBinding data
func NewClusterRoleBindingCollector ¶
func NewClusterRoleBindingCollector( client kubernetes.Interface, excludedClusterRoleBindings []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ClusterRoleBindingCollector
NewClusterRoleBindingCollector creates a new collector for ClusterRoleBinding resources
func (*ClusterRoleBindingCollector) AddResource ¶
func (c *ClusterRoleBindingCollector) AddResource(resource interface{}) error
AddResource manually adds a ClusterRoleBinding resource to be processed by the collector
func (*ClusterRoleBindingCollector) GetResourceChannel ¶
func (c *ClusterRoleBindingCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ClusterRoleBindingCollector) GetType ¶
func (c *ClusterRoleBindingCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ClusterRoleBindingCollector) IsAvailable ¶
func (c *ClusterRoleBindingCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if ClusterRoleBinding resources are available in the cluster
func (*ClusterRoleBindingCollector) Start ¶
func (c *ClusterRoleBindingCollector) Start(ctx context.Context) error
Start begins the ClusterRoleBinding collection process
func (*ClusterRoleBindingCollector) Stop ¶
func (c *ClusterRoleBindingCollector) Stop() error
Stop gracefully shuts down the ClusterRoleBinding collector
type ClusterRoleCollector ¶
type ClusterRoleCollector struct {
// contains filtered or unexported fields
}
ClusterRoleCollector watches for ClusterRole events and collects ClusterRole data
func NewClusterRoleCollector ¶
func NewClusterRoleCollector( client kubernetes.Interface, excludedClusterRoles []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ClusterRoleCollector
NewClusterRoleCollector creates a new collector for ClusterRole resources
func (*ClusterRoleCollector) AddResource ¶
func (c *ClusterRoleCollector) AddResource(resource interface{}) error
AddResource manually adds a cluster role resource to be processed by the collector
func (*ClusterRoleCollector) GetResourceChannel ¶
func (c *ClusterRoleCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ClusterRoleCollector) GetType ¶
func (c *ClusterRoleCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ClusterRoleCollector) IsAvailable ¶
func (c *ClusterRoleCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if ClusterRole resources are available in the cluster
func (*ClusterRoleCollector) Start ¶
func (c *ClusterRoleCollector) Start(ctx context.Context) error
Start begins the ClusterRole collection process
func (*ClusterRoleCollector) Stop ¶
func (c *ClusterRoleCollector) Stop() error
Stop gracefully shuts down the ClusterRole collector
type CollectedResource ¶
type CollectedResource struct {
ResourceType ResourceType
// Object is the actual Kubernetes resource object
Object interface{}
// Timestamp is when the resource was collected
Timestamp time.Time
// EventType indicates whether this is an add, update, or delete event
EventType EventType
// Key is a unique identifier for this resource
Key string
}
CollectedResource represents a resource collected from the Kubernetes API
type CollectionConfig ¶
type CollectionConfig struct {
// Namespaces to include (empty means all)
Namespaces []string
// ExcludedNamespaces are namespaces to exclude from collection
ExcludedNamespaces []string
// ExcludedPods are pods to exclude from collection
ExcludedPods []ExcludedPod
// ExcludedDaemonSets are daemonsets to exclude from Collection
ExcludedDaemonSets []ExcludedDaemonSet
// ExcludedStatefulSets are statefulsets to exclude from Collection
ExcludedStatefulSets []ExcludedStatefulSet
// BufferSize is the size of the combined channel buffer
BufferSize int
}
CollectionConfig contains configuration for collection
type CollectionManager ¶
type CollectionManager struct {
// contains filtered or unexported fields
}
CollectionManager orchestrates multiple collectors
func NewCollectionManager ¶
func NewCollectionManager(config *CollectionConfig, client kubernetes.Interface, telemetryMetrics *TelemetryMetrics, logger logr.Logger, telemetryLogger telemetry_logger.Logger, healthManager *health.HealthManager, ) *CollectionManager
NewCollectionManager creates a new collection manager
func (*CollectionManager) DeregisterCollector ¶
func (m *CollectionManager) DeregisterCollector(collectorType string) error
DeregisterCollector stops and removes a specific collector
func (*CollectionManager) GetCollector ¶
func (m *CollectionManager) GetCollector(collectorType string) ResourceCollector
GetCollector returns a specific collector by type, or nil if not found
func (*CollectionManager) GetCollectorTypes ¶
func (m *CollectionManager) GetCollectorTypes() []string
GetCollectorTypes returns a list of all registered collector types
func (*CollectionManager) GetCombinedChannel ¶
func (m *CollectionManager) GetCombinedChannel() <-chan []CollectedResource
GetCombinedChannel returns the combined channel for all collectors
func (*CollectionManager) IsCollectorRunning ¶
func (m *CollectionManager) IsCollectorRunning(collectorType string) bool
IsCollectorRunning checks if a specific collector is currently running
func (*CollectionManager) RegisterCollector ¶
func (m *CollectionManager) RegisterCollector(collector ResourceCollector) error
RegisterCollector adds a new collector
func (*CollectionManager) StartAll ¶
func (m *CollectionManager) StartAll(ctx context.Context) error
StartAll starts all registered collectors
func (*CollectionManager) StartCollector ¶
func (m *CollectionManager) StartCollector(ctx context.Context, collectorType string) error
StartCollector starts a specific collector
func (*CollectionManager) StopAll ¶
func (m *CollectionManager) StopAll() error
StopAll stops all registered collectors TODO: FIX THIS, FIX THIS, stop all currently acts like reset button, preparing the same CollectionManager instance to be used again, which doesnt feels good.
func (*CollectionManager) StopCollector ¶
func (m *CollectionManager) StopCollector(collectorType string) error
StopCollector stops a specific collector
type ContainerMetricsSnapshot ¶
type ContainerMetricsSnapshot struct {
// Container identification
ContainerName string `json:"containerName"`
PodName string `json:"podName"`
Namespace string `json:"namespace"`
NodeName string `json:"nodeName"`
// Inferred Workload (Top-level owner)
WorkloadName string `json:"workloadName,omitempty"`
WorkloadKind string `json:"workloadKind,omitempty"`
// CPU/Memory resource usage
CpuUsageMillis int64 `json:"cpuUsageMillis"`
MemoryUsageBytes int64 `json:"memoryUsageBytes"`
// Resource requests and limits
CpuRequestMillis int64 `json:"cpuRequestMillis"`
CpuLimitMillis int64 `json:"cpuLimitMillis"`
MemoryRequestBytes int64 `json:"memoryRequestBytes"`
MemoryLimitBytes int64 `json:"memoryLimitBytes"`
// Labels from the pod for correlation
PodLabels map[string]string `json:"podLabels"`
// Container metadata for reference
ContainerImage string `json:"containerImage"`
// Status info
ContainerRunning bool `json:"containerRunning"`
ContainerRestarts bool `json:"containerRestarts"`
RestartCount int64 `json:"restartCount"`
LastTerminationReason string `json:"lastTerminationReason"`
// Network metrics (pod-level aggregated - shared across all containers in pod)
// NetworkMetricsArePodLevel indicates that network metrics represent the entire pod,
// not just this container. In Kubernetes, network metrics are only available at the
// pod level because all containers share the same network namespace.
NetworkMetricsArePodLevel bool `json:"networkMetricsArePodLevel,omitempty"`
PodContainerCount int `json:"podContainerCount,omitempty"` // Number of containers in the pod
NetworkReceiveBytes float64 `json:"networkReceiveBytes,omitempty"`
NetworkTransmitBytes float64 `json:"networkTransmitBytes,omitempty"`
NetworkReceivePackets float64 `json:"networkReceivePackets,omitempty"`
NetworkTransmitPackets float64 `json:"networkTransmitPackets,omitempty"`
NetworkReceiveErrors float64 `json:"networkReceiveErrors,omitempty"`
NetworkTransmitErrors float64 `json:"networkTransmitErrors,omitempty"`
NetworkReceiveDropped float64 `json:"networkReceiveDropped,omitempty"`
NetworkTransmitDropped float64 `json:"networkTransmitDropped,omitempty"`
// I/O metrics
FsReadBytes float64 `json:"fsReadBytes,omitempty"`
FsWriteBytes float64 `json:"fsWriteBytes,omitempty"`
FsReads float64 `json:"fsReads,omitempty"`
FsWrites float64 `json:"fsWrites,omitempty"`
// CPU throttle metrics from CFS bandwidth controller
CpuThrottledFraction float64 `json:"cpuThrottledFraction,omitempty"`
// GPU metrics
GpuUsage interface{} `json:"gpuUsage,omitempty"`
GpuMetricsCount interface{} `json:"gpuMetricsCount,omitempty"`
GpuUtilizationPercentage interface{} `json:"gpuUtilizationPercentage,omitempty"`
GpuMemoryUsedMb interface{} `json:"gpuMemoryUsedMb,omitempty"`
GpuMemoryFreeMb interface{} `json:"gpuMemoryFreeMb,omitempty"`
GpuPowerUsageWatts interface{} `json:"gpuPowerUsageWatts,omitempty"`
GpuTemperatureCelsius interface{} `json:"gpuTemperatureCelsius,omitempty"`
GpuSMClockMHz interface{} `json:"gpuSMClockMHz,omitempty"`
GpuMemClockMHz interface{} `json:"gpuMemClockMHz,omitempty"`
GpuModels interface{} `json:"gpuModels,omitempty"`
GpuUUIDs interface{} `json:"gpuUUIDs,omitempty"`
GpuRequestCount interface{} `json:"gpuRequestCount,omitempty"`
GpuLimitCount interface{} `json:"gpuLimitCount,omitempty"`
GpuTotalMemoryMb interface{} `json:"gpuTotalMemoryMb,omitempty"`
IndividualGPUMetrics string `json:"individualGPUMetrics,omitempty"` // JSON string
}
ContainerMetricsSnapshot represents a strongly-typed snapshot of container resource metrics
type ContainerResourceCollector ¶
type ContainerResourceCollector struct {
// contains filtered or unexported fields
}
ContainerResourceCollector collects container resource usage metrics
func NewContainerResourceCollector ¶
func NewContainerResourceCollector( k8sClient kubernetes.Interface, metricsClient *metricsv1.Clientset, config ContainerResourceCollectorConfig, namespaces []string, excludedPods []ExcludedPod, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, metrics *TelemetryMetrics, telemetryLogger telemetry_logger.Logger, ) *ContainerResourceCollector
NewContainerResourceCollector creates a new collector for container resource metrics
func (*ContainerResourceCollector) AddResource ¶
func (c *ContainerResourceCollector) AddResource(resource interface{}) error
AddResource is a no-op for container resource collector - we never sync individual containers
func (*ContainerResourceCollector) GetResourceChannel ¶
func (c *ContainerResourceCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ContainerResourceCollector) GetType ¶
func (c *ContainerResourceCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ContainerResourceCollector) IsAvailable ¶
func (c *ContainerResourceCollector) IsAvailable(ctx context.Context) bool
IsAvailable always returns true - actual availability is checked during collection
func (*ContainerResourceCollector) Start ¶
func (c *ContainerResourceCollector) Start(ctx context.Context) error
Start begins the container resource collection process
func (*ContainerResourceCollector) Stop ¶
func (c *ContainerResourceCollector) Stop() error
Stop gracefully shuts down the container resource collector
type ContainerResourceCollectorConfig ¶
type ContainerResourceCollectorConfig struct {
// UpdateInterval specifies how often to collect metrics
UpdateInterval time.Duration
// PrometheusURL specifies the URL of the Prometheus instance to query
// If empty, defaults to in-cluster Prometheus at http://prometheus.monitoring:9090
PrometheusURL string
// QueryTimeout specifies the timeout for Prometheus queries
QueryTimeout time.Duration
// DisableNetworkIOMetrics determines whether to disable network and I/O metrics collection
// Default is false, so metrics are collected by default
DisableNetworkIOMetrics bool
// DisableGPUMetrics determines whether to disable GPU metrics collection
// Default is false, so metrics are collected by default
DisableGPUMetrics bool
}
ContainerResourceCollectorConfig holds configuration for the resource collector
type CronJobCollector ¶
type CronJobCollector struct {
// contains filtered or unexported fields
}
CronJobCollector watches for cronjob events and collects cronjob data
func NewCronJobCollector ¶
func NewCronJobCollector( client kubernetes.Interface, namespaces []string, excludedCronJobs []ExcludedCronJob, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *CronJobCollector
NewCronJobCollector creates a new collector for cronjob resources
func (*CronJobCollector) AddResource ¶
func (c *CronJobCollector) AddResource(resource interface{}) error
AddResource manually adds a cronjob resource to be processed by the collector
func (*CronJobCollector) GetResourceChannel ¶
func (c *CronJobCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*CronJobCollector) GetType ¶
func (c *CronJobCollector) GetType() string
GetType returns the type of resource this collector handles
func (*CronJobCollector) IsAvailable ¶
func (c *CronJobCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if CronJob resources can be accessed in the cluster
func (*CronJobCollector) Start ¶
func (c *CronJobCollector) Start(ctx context.Context) error
Start begins the cronjob collection process
func (*CronJobCollector) Stop ¶
func (c *CronJobCollector) Stop() error
Stop gracefully shuts down the cronjob collector
type DaemonSetCollector ¶
type DaemonSetCollector struct {
// contains filtered or unexported fields
}
DaemonSetCollector watches for daemonset events and collects daemonset data
func NewDaemonSetCollector ¶
func NewDaemonSetCollector( client kubernetes.Interface, namespaces []string, excludedDaemonSets []ExcludedDaemonSet, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *DaemonSetCollector
NewDaemonSetCollector creates a new collector for daemonset resources
func (*DaemonSetCollector) AddResource ¶
func (c *DaemonSetCollector) AddResource(resource interface{}) error
AddResource manually adds a DaemonSet resource to be processed by the collector
func (*DaemonSetCollector) GetResourceChannel ¶
func (c *DaemonSetCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*DaemonSetCollector) GetType ¶
func (c *DaemonSetCollector) GetType() string
GetType returns the type of resource this collector handles
func (*DaemonSetCollector) IsAvailable ¶
func (c *DaemonSetCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if DaemonSet resources can be accessed in the cluster
func (*DaemonSetCollector) Start ¶
func (c *DaemonSetCollector) Start(ctx context.Context) error
Start begins the daemonset collection process
func (*DaemonSetCollector) Stop ¶
func (c *DaemonSetCollector) Stop() error
Stop gracefully shuts down the daemonset collector
type DatadogCollector ¶
type DatadogCollector struct {
// contains filtered or unexported fields
}
DatadogCollector watches for DataDog custom resources
func NewDatadogCollector ¶
func NewDatadogCollector( dynamicClient dynamic.Interface, namespaces []string, excludedReplicaSets []ExcludedDatadogExtendedDaemonSetReplicaSet, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *DatadogCollector
NewDatadogCollector creates a new collector for DataDog resources
func (*DatadogCollector) AddResource ¶
func (c *DatadogCollector) AddResource(resource interface{}) error
AddResource manually adds a DataDog resource to be processed by the collector
func (*DatadogCollector) GetResourceChannel ¶
func (c *DatadogCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*DatadogCollector) GetType ¶
func (c *DatadogCollector) GetType() string
GetType returns the type of resource this collector handles
func (*DatadogCollector) IsAvailable ¶
func (c *DatadogCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if DataDog resources can be accessed in the cluster
func (*DatadogCollector) Start ¶
func (c *DatadogCollector) Start(ctx context.Context) error
Start begins the DataDog resources collection process
func (*DatadogCollector) Stop ¶
func (c *DatadogCollector) Stop() error
Stop gracefully shuts down the DataDog collector
type DeploymentCollector ¶
type DeploymentCollector struct {
// contains filtered or unexported fields
}
DeploymentCollector watches for deployment events and collects deployment data
func NewDeploymentCollector ¶
func NewDeploymentCollector( client kubernetes.Interface, namespaces []string, excludedDeployments []ExcludedDeployment, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *DeploymentCollector
NewDeploymentCollector creates a new collector for deployment resources
func (*DeploymentCollector) AddResource ¶
func (c *DeploymentCollector) AddResource(resource interface{}) error
AddResource manually adds a deployment resource to be processed by the collector
func (*DeploymentCollector) GetResourceChannel ¶
func (c *DeploymentCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*DeploymentCollector) GetType ¶
func (c *DeploymentCollector) GetType() string
GetType returns the type of resource this collector handles
func (*DeploymentCollector) IsAvailable ¶
func (c *DeploymentCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Deployment resources can be accessed in the cluster
func (*DeploymentCollector) Start ¶
func (c *DeploymentCollector) Start(ctx context.Context) error
Start begins the deployment collection process
func (*DeploymentCollector) Stop ¶
func (c *DeploymentCollector) Stop() error
Stop gracefully shuts down the deployment collector
type EndpointCollector ¶
type EndpointCollector struct {
// contains filtered or unexported fields
}
EndpointCollector watches for endpoints events and collects endpoints data
func NewEndpointCollector ¶
func NewEndpointCollector( client kubernetes.Interface, namespaces []string, excludedEndpoints []ExcludedEndpoint, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *EndpointCollector
NewEndpointCollector creates a new collector for endpoints resources
func (*EndpointCollector) AddResource ¶
func (c *EndpointCollector) AddResource(resource interface{}) error
AddResource manually adds a Endpoints resource to be processed by the collector
func (*EndpointCollector) GetResourceChannel ¶
func (c *EndpointCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*EndpointCollector) GetType ¶
func (c *EndpointCollector) GetType() string
GetType returns the type of resource this collector handles
func (*EndpointCollector) IsAvailable ¶
func (c *EndpointCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Endpoints resources can be accessed in the cluster
func (*EndpointCollector) Start ¶
func (c *EndpointCollector) Start(ctx context.Context) error
Start begins the endpoints collection process
func (*EndpointCollector) Stop ¶
func (c *EndpointCollector) Stop() error
Stop gracefully shuts down the endpoints collector
type EventCollector ¶
type EventCollector struct {
// contains filtered or unexported fields
}
EventCollector watches for event events and collects event data
func NewEventCollector ¶
func NewEventCollector( client kubernetes.Interface, namespaces []string, excludedEvents []ExcludedEvent, maxEventsPerType int, retentionPeriod time.Duration, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *EventCollector
NewEventCollector creates a new collector for event resources
func (*EventCollector) AddResource ¶
func (c *EventCollector) AddResource(resource interface{}) error
AddResource manually adds an event resource to be processed by the collector
func (*EventCollector) GetResourceChannel ¶
func (c *EventCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*EventCollector) GetType ¶
func (c *EventCollector) GetType() string
GetType returns the type of resource this collector handles
func (*EventCollector) IsAvailable ¶
func (c *EventCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Event resources can be accessed in the cluster
func (*EventCollector) Start ¶
func (c *EventCollector) Start(ctx context.Context) error
Start begins the event collection process
func (*EventCollector) Stop ¶
func (c *EventCollector) Stop() error
Stop gracefully shuts down the event collector
type EventType ¶
type EventType int
ResourceType represents the type of a resource
const ( // EventTypeUnknown represents an unknown event type EventTypeUnknown EventType = iota // EventTypeAdd represents an added resource EventTypeAdd // EventTypeUpdate represents an updated resource EventTypeUpdate // EventTypeDelete represents a deleted resource EventTypeDelete // EventTypeMetadata represents a metadata resource EventTypeMetadata // EventTypeMetrics represents a metrics resource EventTypeMetrics // EventTypeContainerStarted represents a container started event EventTypeContainerStarted // EventTypeContainerStopped represents a container stopped event EventTypeContainerStopped // EventTypeContainerRestarted represents a container restarted event EventTypeContainerRestarted // EventTypeSnapshot represents a cluster snapshot EventTypeSnapshot )
type ExcludedArgoRollout ¶
type ExcludedArgoRollout struct {
// Namespace is the Argo Rollout's namespace
Namespace string `json:"namespace"`
// Name is the Argo Rollout's name
Name string `json:"name"`
}
ExcludedArgoRollout identifies an Argo Rollout to exclude
type ExcludedCNPGCluster ¶ added in v0.0.66
type ExcludedCNPGCluster struct {
// Namespace is the CNPG cluster's namespace
Namespace string `json:"namespace"`
// Name is the CNPG cluster's name
Name string `json:"name"`
}
ExcludedCNPGCluster identifies a CloudNativePG cluster to exclude from collection
type ExcludedCSIStorageCapacity ¶
type ExcludedCSIStorageCapacity struct {
Namespace string `yaml:"namespace"`
Name string `yaml:"name"`
}
ExcludedCSIStorageCapacity defines a CSIStorageCapacity to be excluded from collection
type ExcludedCronJob ¶
ExcludedCronJob defines a cronjob to exclude from collection
type ExcludedDaemonSet ¶
ExcludedDaemonSet defines a daemonset to exclude from collection
type ExcludedDatadogExtendedDaemonSetReplicaSet ¶
type ExcludedDatadogExtendedDaemonSetReplicaSet struct {
// Namespace is the ExtendedDaemonSetReplicaSet's namespace
Namespace string `json:"namespace"`
// Name is the ExtendedDaemonSetReplicaSet's name
Name string `json:"name"`
}
ExcludedDatadogExtendedDaemonSetReplicaSet identifies an ExtendedDaemonSetReplicaSet to exclude
type ExcludedDeployment ¶
ExcludedDeployment defines a deployment to exclude from collection
type ExcludedEndpoint ¶
ExcludedEndpoint defines an endpoints resource to exclude from collection
type ExcludedEvent ¶
ExcludedEvent defines an event to exclude from collection
type ExcludedHPA ¶
ExcludedHPA defines a HPA to exclude from collection
type ExcludedIngress ¶
ExcludedIngress defines an ingress to exclude from collection
type ExcludedJob ¶
ExcludedJob defines a job to exclude from collection
type ExcludedKubeflowNotebook ¶
ExcludedKubeflowNotebook represents a Kubeflow Notebook to exclude from collection
type ExcludedLimitRange ¶
ExcludedLimitRange defines a limitrange to exclude from collection
type ExcludedNetworkPolicy ¶
ExcludedNetworkPolicy defines a networkpolicy to exclude from collection
type ExcludedPDB ¶
ExcludedPDB defines a PodDisruptionBudget to exclude from collection
type ExcludedPVC ¶
ExcludedPVC defines a PVC to exclude from collection
type ExcludedPod ¶
ExcludedPod identifies a pod to exclude from collection
type ExcludedReplicaSet ¶
ExcludedReplicaSet defines a replicaset to exclude from collection
type ExcludedReplicationController ¶
ExcludedReplicationController defines a replicationcontroller to exclude from collection
type ExcludedResourceQuota ¶
ExcludedResourceQuota defines a resourcequota to exclude from collection
type ExcludedRole ¶
ExcludedRole defines a Role to exclude from collection
type ExcludedRoleBinding ¶
ExcludedRoleBinding defines a RoleBinding to exclude from collection
type ExcludedScaledJob ¶
ExcludedScaledJob represents a ScaledJob to exclude from collection
type ExcludedScaledObject ¶
ExcludedScaledObject represents a ScaledObject to exclude from collection
type ExcludedScheduledSparkApplication ¶ added in v0.0.56
type ExcludedScheduledSparkApplication struct {
// Namespace is the Scheduled Spark Application's namespace
Namespace string `json:"namespace"`
// Name is the Scheduled Spark Application's name
Name string `json:"name"`
}
ExcludedScheduledSparkApplication identifies a Scheduled Spark Application to exclude
type ExcludedService ¶
ExcludedService defines a service to exclude from collection
type ExcludedServiceAccount ¶
ExcludedServiceAccount defines a serviceaccount to exclude from collection
type ExcludedSparkApplication ¶ added in v0.0.56
type ExcludedSparkApplication struct {
// Namespace is the Spark Application's namespace
Namespace string `json:"namespace"`
// Name is the Spark Application's name
Name string `json:"name"`
}
ExcludedSparkApplication identifies a Spark Application to exclude
type ExcludedStatefulSet ¶
ExcludedStatefulSet defines a statefulset to exclude from collection
type ExcludedVPA ¶
ExcludedVPA defines a VPA to exclude from collection
type ExcludedVolcanoJob ¶
ExcludedVolcanoJob represents a Volcano Job to exclude from collection
type HistoricalMetricsCollector ¶ added in v0.0.61
type HistoricalMetricsCollector struct {
// contains filtered or unexported fields
}
HistoricalMetricsCollector queries Prometheus for historical CPU/memory percentiles.
func NewHistoricalMetricsCollector ¶ added in v0.0.61
func NewHistoricalMetricsCollector(logger logr.Logger, prometheusAPI v1.API, healthManager *health.HealthManager) *HistoricalMetricsCollector
NewHistoricalMetricsCollector creates a new collector.
func (*HistoricalMetricsCollector) DiscoverContainers ¶ added in v0.0.61
func (c *HistoricalMetricsCollector) DiscoverContainers(ctx context.Context, namespace, podRegex string) ([]string, error)
DiscoverContainers discovers container names for a workload from Prometheus.
func (*HistoricalMetricsCollector) FetchPercentiles ¶ added in v0.0.61
func (c *HistoricalMetricsCollector) FetchPercentiles(ctx context.Context, workload HistoricalWorkloadQuery) (*gen.HistoricalMetricsSummary, error)
FetchPercentiles queries Prometheus for 24h percentiles for a workload.
func (*HistoricalMetricsCollector) FetchPercentilesForAll ¶ added in v0.0.61
func (c *HistoricalMetricsCollector) FetchPercentilesForAll(ctx context.Context, workloads []HistoricalWorkloadQuery) map[string]*gen.HistoricalMetricsSummary
FetchPercentilesForAll queries Prometheus for all workloads concurrently with rate limiting.
type HistoricalWorkloadQuery ¶ added in v0.0.61
type HistoricalWorkloadQuery struct {
Namespace string
WorkloadName string
WorkloadKind string
PodRegex string // e.g., "web-app-.*"
Containers []string // container names to query
}
HistoricalWorkloadQuery defines what to query for a workload.
type HorizontalPodAutoscalerCollector ¶
type HorizontalPodAutoscalerCollector struct {
// contains filtered or unexported fields
}
HorizontalPodAutoscalerCollector watches for HPA events and collects HPA data
func NewHorizontalPodAutoscalerCollector ¶
func NewHorizontalPodAutoscalerCollector( client kubernetes.Interface, namespaces []string, excludedHPAs []ExcludedHPA, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *HorizontalPodAutoscalerCollector
NewHorizontalPodAutoscalerCollector creates a new collector for HPA resources
func (*HorizontalPodAutoscalerCollector) AddResource ¶
func (c *HorizontalPodAutoscalerCollector) AddResource(resource interface{}) error
AddResource manually adds a HorizontalPodAutoscaler resource to be processed by the collector
func (*HorizontalPodAutoscalerCollector) GetResourceChannel ¶
func (c *HorizontalPodAutoscalerCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*HorizontalPodAutoscalerCollector) GetType ¶
func (c *HorizontalPodAutoscalerCollector) GetType() string
GetType returns the type of resource this collector handles
func (*HorizontalPodAutoscalerCollector) IsAvailable ¶
func (c *HorizontalPodAutoscalerCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if HPA v2 resources can be accessed in the cluster
func (*HorizontalPodAutoscalerCollector) Start ¶
func (c *HorizontalPodAutoscalerCollector) Start(ctx context.Context) error
Start begins the HPA collection process
func (*HorizontalPodAutoscalerCollector) Stop ¶
func (c *HorizontalPodAutoscalerCollector) Stop() error
Stop gracefully shuts down the HPA collector
type IngressClassCollector ¶
type IngressClassCollector struct {
// contains filtered or unexported fields
}
IngressClassCollector watches for IngressClass events and collects IngressClass data
func NewIngressClassCollector ¶
func NewIngressClassCollector( client kubernetes.Interface, excludedIngressClasses []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *IngressClassCollector
NewIngressClassCollector creates a new collector for IngressClass resources
func (*IngressClassCollector) AddResource ¶
func (c *IngressClassCollector) AddResource(resource interface{}) error
AddResource manually adds a IngressClass resource to be processed by the collector
func (*IngressClassCollector) GetResourceChannel ¶
func (c *IngressClassCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*IngressClassCollector) GetType ¶
func (c *IngressClassCollector) GetType() string
GetType returns the type of resource this collector handles
func (*IngressClassCollector) IsAvailable ¶
func (c *IngressClassCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if IngressClass resources can be accessed in the cluster
func (*IngressClassCollector) Start ¶
func (c *IngressClassCollector) Start(ctx context.Context) error
Start begins the IngressClass collection process
func (*IngressClassCollector) Stop ¶
func (c *IngressClassCollector) Stop() error
Stop gracefully shuts down the IngressClass collector
type IngressCollector ¶
type IngressCollector struct {
// contains filtered or unexported fields
}
IngressCollector watches for ingress events and collects ingress data
func NewIngressCollector ¶
func NewIngressCollector( client kubernetes.Interface, namespaces []string, excludedIngresses []ExcludedIngress, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *IngressCollector
NewIngressCollector creates a new collector for ingress resources
func (*IngressCollector) AddResource ¶
func (c *IngressCollector) AddResource(resource interface{}) error
AddResource manually adds a Ingress resource to be processed by the collector
func (*IngressCollector) GetResourceChannel ¶
func (c *IngressCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*IngressCollector) GetType ¶
func (c *IngressCollector) GetType() string
GetType returns the type of resource this collector handles
func (*IngressCollector) IsAvailable ¶
func (c *IngressCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Ingress resources can be accessed in the cluster
func (*IngressCollector) Start ¶
func (c *IngressCollector) Start(ctx context.Context) error
Start begins the ingress collection process
func (*IngressCollector) Stop ¶
func (c *IngressCollector) Stop() error
Stop gracefully shuts down the ingress collector
type JobCollector ¶
type JobCollector struct {
// contains filtered or unexported fields
}
JobCollector watches for job events and collects job data
func NewJobCollector ¶
func NewJobCollector( client kubernetes.Interface, namespaces []string, excludedJobs []ExcludedJob, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *JobCollector
NewJobCollector creates a new collector for job resources
func (*JobCollector) AddResource ¶
func (c *JobCollector) AddResource(resource interface{}) error
AddResource manually adds a job resource to be processed by the collector
func (*JobCollector) GetResourceChannel ¶
func (c *JobCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*JobCollector) GetType ¶
func (c *JobCollector) GetType() string
GetType returns the type of resource this collector handles
func (*JobCollector) IsAvailable ¶
func (c *JobCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Job resources can be accessed in the cluster
func (*JobCollector) Start ¶
func (c *JobCollector) Start(ctx context.Context) error
Start begins the job collection process
func (*JobCollector) Stop ¶
func (c *JobCollector) Stop() error
Stop gracefully shuts down the job collector
type KarpenterCollector ¶
type KarpenterCollector struct {
// contains filtered or unexported fields
}
KarpenterCollector watches for Karpenter resources
func NewKarpenterCollector ¶
func NewKarpenterCollector( dynamicClient dynamic.Interface, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *KarpenterCollector
NewKarpenterCollector creates a new collector for Karpenter resources
func (*KarpenterCollector) AddResource ¶
func (c *KarpenterCollector) AddResource(resource interface{}) error
AddResource manually adds a Karpenter resource to be processed by the collector
func (*KarpenterCollector) ExcludeResource ¶
func (c *KarpenterCollector) ExcludeResource(resourceType, namespace, name string)
ExcludeResource adds a resource to the exclusion list
func (*KarpenterCollector) GetResourceChannel ¶
func (c *KarpenterCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*KarpenterCollector) GetType ¶
func (c *KarpenterCollector) GetType() string
GetType returns the type of resource this collector handles
func (*KarpenterCollector) IsAvailable ¶
func (c *KarpenterCollector) IsAvailable(ctx context.Context) bool
Update IsAvailable to detect version
func (*KarpenterCollector) Start ¶
func (c *KarpenterCollector) Start(ctx context.Context) error
Start begins the Karpenter resources collection process
func (*KarpenterCollector) Stop ¶
func (c *KarpenterCollector) Stop() error
Stop gracefully shuts down all informers
type KarpenterResource ¶
type KarpenterResource struct {
GroupVersion schema.GroupVersion
Resource string
Kind string
}
KarpenterResource defines a Karpenter resource to be watched
type KubeflowNotebookCollector ¶
type KubeflowNotebookCollector struct {
// contains filtered or unexported fields
}
KubeflowNotebookCollector watches for Kubeflow Notebook resources
func NewKubeflowNotebookCollector ¶
func NewKubeflowNotebookCollector( dynamicClient dynamic.Interface, namespaces []string, excludedNotebooks []ExcludedKubeflowNotebook, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *KubeflowNotebookCollector
NewKubeflowNotebookCollector creates a new collector for Kubeflow Notebook resources
func (*KubeflowNotebookCollector) AddResource ¶
func (c *KubeflowNotebookCollector) AddResource(resource interface{}) error
AddResource manually adds a Kubeflow Notebook resource to be processed by the collector
func (*KubeflowNotebookCollector) GetResourceChannel ¶
func (c *KubeflowNotebookCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*KubeflowNotebookCollector) GetType ¶
func (c *KubeflowNotebookCollector) GetType() string
GetType returns the type of resource this collector handles
func (*KubeflowNotebookCollector) IsAvailable ¶
func (c *KubeflowNotebookCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Kubeflow Notebook resources can be accessed in the cluster
func (*KubeflowNotebookCollector) Start ¶
func (c *KubeflowNotebookCollector) Start(ctx context.Context) error
Start begins the Kubeflow Notebook resources collection process
func (*KubeflowNotebookCollector) Stop ¶
func (c *KubeflowNotebookCollector) Stop() error
Stop gracefully shuts down the Kubeflow Notebook collector
type LimitRangeCollector ¶
type LimitRangeCollector struct {
// contains filtered or unexported fields
}
LimitRangeCollector watches for limitrange events and collects limitrange data
func NewLimitRangeCollector ¶
func NewLimitRangeCollector( client kubernetes.Interface, namespaces []string, excludedLimitRanges []ExcludedLimitRange, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *LimitRangeCollector
NewLimitRangeCollector creates a new collector for limitrange resources
func (*LimitRangeCollector) AddResource ¶
func (c *LimitRangeCollector) AddResource(resource interface{}) error
AddResource manually adds a limitrange resource to be processed by the collector
func (*LimitRangeCollector) GetResourceChannel ¶
func (c *LimitRangeCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*LimitRangeCollector) GetType ¶
func (c *LimitRangeCollector) GetType() string
GetType returns the type of resource this collector handles
func (*LimitRangeCollector) IsAvailable ¶
func (c *LimitRangeCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if LimitRange resources can be accessed in the cluster
func (*LimitRangeCollector) Start ¶
func (c *LimitRangeCollector) Start(ctx context.Context) error
Start begins the limitrange collection process
func (*LimitRangeCollector) Stop ¶
func (c *LimitRangeCollector) Stop() error
Stop gracefully shuts down the limitrange collector
type NamespaceCollector ¶
type NamespaceCollector struct {
// contains filtered or unexported fields
}
NamespaceCollector watches for namespace events and collects namespace data
func NewNamespaceCollector ¶
func NewNamespaceCollector( client kubernetes.Interface, excludedNamespaces []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *NamespaceCollector
NewNamespaceCollector creates a new collector for namespace resources
func (*NamespaceCollector) AddResource ¶
func (c *NamespaceCollector) AddResource(resource interface{}) error
AddResource manually adds a namespace resource to be processed by the collector
func (*NamespaceCollector) GetResourceChannel ¶
func (c *NamespaceCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*NamespaceCollector) GetType ¶
func (c *NamespaceCollector) GetType() string
GetType returns the type of resource this collector handles
func (*NamespaceCollector) IsAvailable ¶
func (c *NamespaceCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Namespace resources can be accessed in the cluster
func (*NamespaceCollector) Start ¶
func (c *NamespaceCollector) Start(ctx context.Context) error
Start begins the namespace collection process
func (*NamespaceCollector) Stop ¶
func (c *NamespaceCollector) Stop() error
Stop gracefully shuts down the namespace collector
type NetworkPolicyCollector ¶
type NetworkPolicyCollector struct {
// contains filtered or unexported fields
}
NetworkPolicyCollector watches for networkpolicy events and collects networkpolicy data
func NewNetworkPolicyCollector ¶
func NewNetworkPolicyCollector( client kubernetes.Interface, namespaces []string, excludedNetworkPolicies []ExcludedNetworkPolicy, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *NetworkPolicyCollector
NewNetworkPolicyCollector creates a new collector for networkpolicy resources
func (*NetworkPolicyCollector) AddResource ¶
func (c *NetworkPolicyCollector) AddResource(resource interface{}) error
AddResource manually adds a NetworkPolicy resource to be processed by the collector
func (*NetworkPolicyCollector) GetResourceChannel ¶
func (c *NetworkPolicyCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*NetworkPolicyCollector) GetType ¶
func (c *NetworkPolicyCollector) GetType() string
GetType returns the type of resource this collector handles
func (*NetworkPolicyCollector) IsAvailable ¶
func (c *NetworkPolicyCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if NetworkPolicy resources can be accessed in the cluster
func (*NetworkPolicyCollector) Start ¶
func (c *NetworkPolicyCollector) Start(ctx context.Context) error
Start begins the networkpolicy collection process
func (*NetworkPolicyCollector) Stop ¶
func (c *NetworkPolicyCollector) Stop() error
Stop gracefully shuts down the networkpolicy collector
type NodeCollector ¶
type NodeCollector struct {
// contains filtered or unexported fields
}
NodeCollector collects node events and resource metrics
func NewNodeCollector ¶
func NewNodeCollector( k8sClient kubernetes.Interface, metricsClient *metricsv1.Clientset, config NodeCollectorConfig, excludedNodes []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, metrics *TelemetryMetrics, telemetryLogger telemetry_logger.Logger, ) *NodeCollector
NewNodeCollector creates a new collector for node resources
func (*NodeCollector) AddResource ¶
func (c *NodeCollector) AddResource(resource interface{}) error
AddResource manually adds a node resource to be processed by the collector
func (*NodeCollector) GetResourceChannel ¶
func (c *NodeCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*NodeCollector) GetType ¶
func (c *NodeCollector) GetType() string
GetType returns the type of resource this collector handles
func (*NodeCollector) IsAvailable ¶
func (c *NodeCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Node resources can be accessed in the cluster
func (*NodeCollector) Start ¶
func (c *NodeCollector) Start(ctx context.Context) error
Start begins the node collection process
func (*NodeCollector) Stop ¶
func (c *NodeCollector) Stop() error
Stop gracefully shuts down the node collector
type NodeCollectorConfig ¶
type NodeCollectorConfig struct {
// UpdateInterval specifies how often to collect metrics
UpdateInterval time.Duration
// PrometheusURL specifies the URL of the Prometheus instance to query
// If empty, defaults to in-cluster Prometheus at http://prometheus.monitoring:9090
PrometheusURL string
// QueryTimeout specifies the timeout for Prometheus queries
QueryTimeout time.Duration
// DisableNetworkIOMetrics determines whether to disable network and I/O metrics collection
// Default is false, so metrics are collected by default
DisableNetworkIOMetrics bool
// DisableGPUMetrics determines whether to disable GPU metrics collection
// Default is false, so metrics are collected by default
DisableGPUMetrics bool
}
NodeCollectorConfig holds configuration for the node collector
type PersistentVolumeClaimCollector ¶
type PersistentVolumeClaimCollector struct {
// contains filtered or unexported fields
}
PersistentVolumeClaimCollector watches for PVC events and collects PVC data
func NewPersistentVolumeClaimCollector ¶
func NewPersistentVolumeClaimCollector( client kubernetes.Interface, namespaces []string, excludedPVCs []ExcludedPVC, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *PersistentVolumeClaimCollector
NewPersistentVolumeClaimCollector creates a new collector for PVC resources
func (*PersistentVolumeClaimCollector) AddResource ¶
func (c *PersistentVolumeClaimCollector) AddResource(resource interface{}) error
AddResource manually adds a PVC resource to be processed by the collector
func (*PersistentVolumeClaimCollector) GetResourceChannel ¶
func (c *PersistentVolumeClaimCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*PersistentVolumeClaimCollector) GetType ¶
func (c *PersistentVolumeClaimCollector) GetType() string
GetType returns the type of resource this collector handles
func (*PersistentVolumeClaimCollector) IsAvailable ¶
func (c *PersistentVolumeClaimCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if PersistentVolumeClaim resources can be accessed in the cluster
func (*PersistentVolumeClaimCollector) Start ¶
func (c *PersistentVolumeClaimCollector) Start(ctx context.Context) error
Start begins the PVC collection process
func (*PersistentVolumeClaimCollector) Stop ¶
func (c *PersistentVolumeClaimCollector) Stop() error
Stop gracefully shuts down the PVC collector
type PersistentVolumeClaimMetricsCollector ¶ added in v0.0.58
type PersistentVolumeClaimMetricsCollector struct {
// contains filtered or unexported fields
}
PersistentVolumeClaimMetricsCollector collects PVC storage usage metrics
func NewPersistentVolumeClaimMetricsCollector ¶ added in v0.0.58
func NewPersistentVolumeClaimMetricsCollector( k8sClient kubernetes.Interface, config PersistentVolumeClaimMetricsCollectorConfig, namespaces []string, excludedPVCs []ExcludedPVC, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, metrics *TelemetryMetrics, telemetryLogger telemetry_logger.Logger, ) *PersistentVolumeClaimMetricsCollector
NewPersistentVolumeClaimMetricsCollector creates a new collector for PVC storage metrics
func (*PersistentVolumeClaimMetricsCollector) AddResource ¶ added in v0.0.58
func (c *PersistentVolumeClaimMetricsCollector) AddResource(resource interface{}) error
AddResource is a no-op for PVC metrics collector
func (*PersistentVolumeClaimMetricsCollector) GetResourceChannel ¶ added in v0.0.58
func (c *PersistentVolumeClaimMetricsCollector) GetResourceChannel() <-chan []CollectedResource
func (*PersistentVolumeClaimMetricsCollector) GetType ¶ added in v0.0.58
func (c *PersistentVolumeClaimMetricsCollector) GetType() string
func (*PersistentVolumeClaimMetricsCollector) IsAvailable ¶ added in v0.0.58
func (c *PersistentVolumeClaimMetricsCollector) IsAvailable(ctx context.Context) bool
func (*PersistentVolumeClaimMetricsCollector) Start ¶ added in v0.0.58
func (c *PersistentVolumeClaimMetricsCollector) Start(ctx context.Context) error
Start begins the PVC metrics collection process
func (*PersistentVolumeClaimMetricsCollector) Stop ¶ added in v0.0.58
func (c *PersistentVolumeClaimMetricsCollector) Stop() error
Stop gracefully shuts down the PVC metrics collector
type PersistentVolumeClaimMetricsCollectorConfig ¶ added in v0.0.58
type PersistentVolumeClaimMetricsCollectorConfig struct {
// UpdateInterval specifies how often to collect PVC metrics
UpdateInterval time.Duration
// PrometheusURL specifies the URL of the Prometheus instance to query
// If empty, defaults to in-cluster Prometheus at http://prometheus.monitoring:9090
PrometheusURL string
// QueryTimeout specifies the timeout for Prometheus queries
QueryTimeout time.Duration
}
PersistentVolumeClaimMetricsCollectorConfig holds configuration for the PVC metrics collector
type PersistentVolumeClaimMetricsSnapshot ¶ added in v0.0.58
type PersistentVolumeClaimMetricsSnapshot struct {
// PVC identification
PvcName string `json:"pvcName"`
Namespace string `json:"namespace"`
PvcUID string `json:"pvcUID"`
// Volume binding information
PvName string `json:"pvName,omitempty"`
StorageClassName string `json:"storageClassName,omitempty"`
VolumeMode string `json:"volumeMode,omitempty"` // "Filesystem" or "Block"
// Additional metadata for UI and cost attribution
AccessModes []string `json:"accessModes,omitempty"` // e.g., ["ReadWriteOnce"]
RequestedBytes int64 `json:"requestedBytes,omitempty"` // From PVC spec resources.requests.storage
// Storage usage metrics
UsedBytes int64 `json:"usedBytes"`
CapacityBytes int64 `json:"capacityBytes"`
AvailableBytes int64 `json:"availableBytes"`
UtilizationPct float64 `json:"utilizationPct"`
// Quality and source information
StatsAvailable bool `json:"statsAvailable"`
StatsSource string `json:"statsSource"` // "csi", "kubelet", "unknown"
}
PersistentVolumeClaimMetricsSnapshot represents a strongly-typed snapshot of PVC storage usage metrics
type PersistentVolumeCollector ¶
type PersistentVolumeCollector struct {
// contains filtered or unexported fields
}
PersistentVolumeCollector watches for PV events and collects PV data
func NewPersistentVolumeCollector ¶
func NewPersistentVolumeCollector( client kubernetes.Interface, excludedPVs []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *PersistentVolumeCollector
NewPersistentVolumeCollector creates a new collector for PV resources
func (*PersistentVolumeCollector) AddResource ¶
func (c *PersistentVolumeCollector) AddResource(resource interface{}) error
AddResource manually adds a persistent volume resource to be processed by the collector
func (*PersistentVolumeCollector) GetResourceChannel ¶
func (c *PersistentVolumeCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*PersistentVolumeCollector) GetType ¶
func (c *PersistentVolumeCollector) GetType() string
GetType returns the type of resource this collector handles
func (*PersistentVolumeCollector) IsAvailable ¶
func (c *PersistentVolumeCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if PersistentVolume resources can be accessed in the cluster
func (*PersistentVolumeCollector) Start ¶
func (c *PersistentVolumeCollector) Start(ctx context.Context) error
Start begins the PV collection process
func (*PersistentVolumeCollector) Stop ¶
func (c *PersistentVolumeCollector) Stop() error
Stop gracefully shuts down the PV collector
type PodCollector ¶
type PodCollector struct {
// contains filtered or unexported fields
}
PodCollector watches for pod events and collects pod data
func NewPodCollector ¶
func NewPodCollector( client kubernetes.Interface, namespaces []string, excludedPods []ExcludedPod, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *PodCollector
NewPodCollector creates a new collector for pod resources
func (*PodCollector) AddResource ¶
func (c *PodCollector) AddResource(resource interface{}) error
AddResource manually adds a pod resource to be processed by the collector
func (*PodCollector) GetResourceChannel ¶
func (c *PodCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*PodCollector) GetType ¶
func (c *PodCollector) GetType() string
GetType returns the type of resource this collector handles
func (*PodCollector) IsAvailable ¶
func (c *PodCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Pod resources can be accessed in the cluster
func (*PodCollector) Start ¶
func (c *PodCollector) Start(ctx context.Context) error
Start begins the pod collection process
func (*PodCollector) Stop ¶
func (c *PodCollector) Stop() error
Stop gracefully shuts down the pod collector
type PodDisruptionBudgetCollector ¶
type PodDisruptionBudgetCollector struct {
// contains filtered or unexported fields
}
PodDisruptionBudgetCollector watches for PDB events and collects PDB data
func NewPodDisruptionBudgetCollector ¶
func NewPodDisruptionBudgetCollector( client kubernetes.Interface, namespaces []string, excludedPDBs []ExcludedPDB, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *PodDisruptionBudgetCollector
NewPodDisruptionBudgetCollector creates a new collector for PDB resources
func (*PodDisruptionBudgetCollector) AddResource ¶
func (c *PodDisruptionBudgetCollector) AddResource(resource interface{}) error
AddResource manually adds a PDB resource to be processed by the collector
func (*PodDisruptionBudgetCollector) GetResourceChannel ¶
func (c *PodDisruptionBudgetCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*PodDisruptionBudgetCollector) GetType ¶
func (c *PodDisruptionBudgetCollector) GetType() string
GetType returns the type of resource this collector handles
func (*PodDisruptionBudgetCollector) IsAvailable ¶
func (c *PodDisruptionBudgetCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if PodDisruptionBudget resources can be accessed in the cluster
func (*PodDisruptionBudgetCollector) Start ¶
func (c *PodDisruptionBudgetCollector) Start(ctx context.Context) error
Start begins the PDB collection process
func (*PodDisruptionBudgetCollector) Stop ¶
func (c *PodDisruptionBudgetCollector) Stop() error
Stop gracefully shuts down the PDB collector
type PrometheusRoundTripper ¶
type PrometheusRoundTripper struct {
// contains filtered or unexported fields
}
PrometheusRoundTripper is an http.RoundTripper that captures metrics about requests
func NewPrometheusRoundTripper ¶
func NewPrometheusRoundTripper(next http.RoundTripper, metrics *TelemetryMetrics) *PrometheusRoundTripper
NewPrometheusRoundTripper creates a new round tripper that captures metrics
type ReplicaSetCollector ¶
type ReplicaSetCollector struct {
// contains filtered or unexported fields
}
ReplicaSetCollector watches for replicaset events and collects replicaset data
func NewReplicaSetCollector ¶
func NewReplicaSetCollector( client kubernetes.Interface, namespaces []string, excludedReplicaSets []ExcludedReplicaSet, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ReplicaSetCollector
NewReplicaSetCollector creates a new collector for replicaset resources
func (*ReplicaSetCollector) AddResource ¶
func (c *ReplicaSetCollector) AddResource(resource interface{}) error
AddResource manually adds a ReplicaSet resource to be processed by the collector
func (*ReplicaSetCollector) GetResourceChannel ¶
func (c *ReplicaSetCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ReplicaSetCollector) GetType ¶
func (c *ReplicaSetCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ReplicaSetCollector) IsAvailable ¶
func (c *ReplicaSetCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if ReplicaSet resources can be accessed in the cluster
func (*ReplicaSetCollector) Start ¶
func (c *ReplicaSetCollector) Start(ctx context.Context) error
Start begins the replicaset collection process
func (*ReplicaSetCollector) Stop ¶
func (c *ReplicaSetCollector) Stop() error
Stop gracefully shuts down the replicaset collector
type ReplicationControllerCollector ¶
type ReplicationControllerCollector struct {
// contains filtered or unexported fields
}
ReplicationControllerCollector watches for replicationcontroller events and collects replicationcontroller data
func NewReplicationControllerCollector ¶
func NewReplicationControllerCollector( client kubernetes.Interface, namespaces []string, excludedReplicationControllers []ExcludedReplicationController, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ReplicationControllerCollector
NewReplicationControllerCollector creates a new collector for replicationcontroller resources
func (*ReplicationControllerCollector) AddResource ¶
func (c *ReplicationControllerCollector) AddResource(resource interface{}) error
AddResource manually adds a replicationcontroller resource to be processed by the collector
func (*ReplicationControllerCollector) GetResourceChannel ¶
func (c *ReplicationControllerCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ReplicationControllerCollector) GetType ¶
func (c *ReplicationControllerCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ReplicationControllerCollector) IsAvailable ¶
func (c *ReplicationControllerCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if ReplicationController resources can be accessed in the cluster
func (*ReplicationControllerCollector) Start ¶
func (c *ReplicationControllerCollector) Start(ctx context.Context) error
Start begins the replicationcontroller collection process
func (*ReplicationControllerCollector) Stop ¶
func (c *ReplicationControllerCollector) Stop() error
Stop gracefully shuts down the replicationcontroller collector
type ResettableCollector ¶
type ResettableCollector interface {
prometheus.Collector
Reset()
}
Resettable is an interface for metrics that can be reset We have to reset any counters or gauges after sending them to dakr to avoid sending the same values again
type ResourceCollector ¶
type ResourceCollector interface {
// Start begins watching for resources
Start(ctx context.Context) error
// Stop halts watching for resources
Stop() error
// GetResourceChannel returns a channel for receiving collected resources
GetResourceChannel() <-chan []CollectedResource
// GetType returns the type of resource this collector handles
GetType() string
// Returns true if the resource is available
IsAvailable(ctx context.Context) bool
// AddResource manually adds a resource to be processed by the collector
AddResource(resource interface{}) error
}
ResourceCollector defines methods for collecting specific resource types
type ResourceQuotaCollector ¶
type ResourceQuotaCollector struct {
// contains filtered or unexported fields
}
ResourceQuotaCollector watches for resourcequota events and collects resourcequota data
func NewResourceQuotaCollector ¶
func NewResourceQuotaCollector( client kubernetes.Interface, namespaces []string, excludedResourceQuotas []ExcludedResourceQuota, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ResourceQuotaCollector
NewResourceQuotaCollector creates a new collector for resourcequota resources
func (*ResourceQuotaCollector) AddResource ¶
func (c *ResourceQuotaCollector) AddResource(resource interface{}) error
AddResource manually adds a resourcequota resource to be processed by the collector
func (*ResourceQuotaCollector) GetResourceChannel ¶
func (c *ResourceQuotaCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ResourceQuotaCollector) GetType ¶
func (c *ResourceQuotaCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ResourceQuotaCollector) IsAvailable ¶
func (c *ResourceQuotaCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if ResourceQuota resources can be accessed in the cluster
func (*ResourceQuotaCollector) Start ¶
func (c *ResourceQuotaCollector) Start(ctx context.Context) error
Start begins the resourcequota collection process
func (*ResourceQuotaCollector) Stop ¶
func (c *ResourceQuotaCollector) Stop() error
Stop gracefully shuts down the resourcequota collector
type ResourceType ¶
type ResourceType int
ResourceType is a type for the type of resource being collected
const ( Unknown ResourceType = iota Cluster Node Pod Namespace Event Endpoints ServiceAccount LimitRange ResourceQuota Deployment StatefulSet DaemonSet ReplicaSet ReplicationController Job CronJob PersistentVolumeClaim PersistentVolume PersistentVolumeClaimMetrics StorageClass Service Ingress IngressClass NetworkPolicy Role RoleBinding ClusterRole ClusterRoleBinding HorizontalPodAutoscaler VerticalPodAutoscaler PodDisruptionBudget PodSecurityPolicy CustomResourceDefinition // leaving here to not screw up enum numbering CustomResource // leaving here to not screw up enum numbering ConfigMap // leaving here to not screw up enum numbering Secret // leaving here to not screw up enum numbering Container // leaving here to not screw up enum numbering NodeResource ContainerResource CSINode Karpenter Datadog ArgoRollouts Keda KedaScaledJob KedaScaledObject ClusterSnapshot CSIDriver CSIStorageCapacity VolumeAttachment KubeflowNotebook VolcanoJob SparkApplication ScheduledSparkApplication WorkloadRecommendation WorkloadRule CNPGCluster )
enum for resource type
func AllResourceTypes ¶
func AllResourceTypes() []ResourceType
AllResourceTypes returns all defined resource types
func GetResourceTypeFromString ¶
func GetResourceTypeFromString(typeStr string) ResourceType
GetResourceTypeFromString converts a string to the corresponding ResourceType
func (ResourceType) ProtoType ¶
func (r ResourceType) ProtoType() gen.ResourceType
ProtoType returns the string representation of the ResourceType for the protobuf
func (ResourceType) String ¶
func (r ResourceType) String() string
String returns the string representation of the ResourceType
type ResourcesBatcher ¶
type ResourcesBatcher struct {
// contains filtered or unexported fields
}
ResourcesBatcher handles batching of CollectedResource items.
func NewResourcesBatcher ¶
func NewResourcesBatcher( batchSize int, maxBatchTime time.Duration, inputChan <-chan CollectedResource, outBatchChan chan<- []CollectedResource, logger logr.Logger, ) *ResourcesBatcher
NewResourcesBatcher creates a new ResourcesBatcher.
type RoleBindingCollector ¶
type RoleBindingCollector struct {
// contains filtered or unexported fields
}
RoleBindingCollector watches for RoleBinding events and collects RoleBinding data
func NewRoleBindingCollector ¶
func NewRoleBindingCollector( client kubernetes.Interface, namespaces []string, excludedRoleBindings []ExcludedRoleBinding, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *RoleBindingCollector
NewRoleBindingCollector creates a new collector for RoleBinding resources
func (*RoleBindingCollector) AddResource ¶
func (c *RoleBindingCollector) AddResource(resource interface{}) error
AddResource manually adds a RoleBinding resource to be processed by the collector
func (*RoleBindingCollector) GetResourceChannel ¶
func (c *RoleBindingCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*RoleBindingCollector) GetType ¶
func (c *RoleBindingCollector) GetType() string
GetType returns the type of resource this collector handles
func (*RoleBindingCollector) IsAvailable ¶
func (c *RoleBindingCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if RoleBinding resources can be accessed in the cluster
func (*RoleBindingCollector) Start ¶
func (c *RoleBindingCollector) Start(ctx context.Context) error
Start begins the RoleBinding collection process
func (*RoleBindingCollector) Stop ¶
func (c *RoleBindingCollector) Stop() error
Stop gracefully shuts down the RoleBinding collector
type RoleCollector ¶
type RoleCollector struct {
// contains filtered or unexported fields
}
RoleCollector watches for Role events and collects Role data
func NewRoleCollector ¶
func NewRoleCollector( client kubernetes.Interface, namespaces []string, excludedRoles []ExcludedRole, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *RoleCollector
NewRoleCollector creates a new collector for Role resources
func (*RoleCollector) AddResource ¶
func (c *RoleCollector) AddResource(resource interface{}) error
AddResource manually adds a Role resource to be processed by the collector
func (*RoleCollector) GetResourceChannel ¶
func (c *RoleCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*RoleCollector) GetType ¶
func (c *RoleCollector) GetType() string
GetType returns the type of resource this collector handles
func (*RoleCollector) IsAvailable ¶
func (c *RoleCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Role resources can be accessed in the cluster
func (*RoleCollector) Start ¶
func (c *RoleCollector) Start(ctx context.Context) error
Start begins the Role collection process
func (*RoleCollector) Stop ¶
func (c *RoleCollector) Stop() error
Stop gracefully shuts down the Role collector
type ScaledJobCollector ¶
type ScaledJobCollector struct {
// contains filtered or unexported fields
}
ScaledJobCollector watches for ScaledJob events and collects ScaledJob data
func NewScaledJobCollector ¶
func NewScaledJobCollector( client kedaclient.Interface, namespaces []string, excludedScaledJobs []ExcludedScaledJob, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ScaledJobCollector
NewScaledJobCollector creates a new collector for ScaledJob resources
func (*ScaledJobCollector) AddResource ¶
func (c *ScaledJobCollector) AddResource(resource interface{}) error
AddResource manually adds a scaled job resource to be processed by the collector
func (*ScaledJobCollector) GetResourceChannel ¶
func (c *ScaledJobCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ScaledJobCollector) GetType ¶
func (c *ScaledJobCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ScaledJobCollector) IsAvailable ¶
func (c *ScaledJobCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if ScaledJob resources can be accessed in the cluster
func (*ScaledJobCollector) Start ¶
func (c *ScaledJobCollector) Start(ctx context.Context) error
Start begins the ScaledJob collection process
func (*ScaledJobCollector) Stop ¶
func (c *ScaledJobCollector) Stop() error
Stop gracefully shuts down the ScaledJob collector
type ScaledObjectCollector ¶
type ScaledObjectCollector struct {
// contains filtered or unexported fields
}
ScaledObjectCollector watches for ScaledObject events and collects ScaledObject data
func NewScaledObjectCollector ¶
func NewScaledObjectCollector( client kedaclient.Interface, namespaces []string, excludedScaledObjects []ExcludedScaledObject, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ScaledObjectCollector
NewScaledObjectCollector creates a new collector for ScaledObject resources
func (*ScaledObjectCollector) AddResource ¶
func (c *ScaledObjectCollector) AddResource(resource interface{}) error
AddResource manually adds a scaled object resource to be processed by the collector
func (*ScaledObjectCollector) GetResourceChannel ¶
func (c *ScaledObjectCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ScaledObjectCollector) GetType ¶
func (c *ScaledObjectCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ScaledObjectCollector) IsAvailable ¶
func (c *ScaledObjectCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if ScaledObject resources can be accessed in the cluster
func (*ScaledObjectCollector) Start ¶
func (c *ScaledObjectCollector) Start(ctx context.Context) error
Start begins the ScaledObject collection process
func (*ScaledObjectCollector) Stop ¶
func (c *ScaledObjectCollector) Stop() error
Stop gracefully shuts down the ScaledObject collector
type ScheduledSparkApplicationCollector ¶ added in v0.0.56
type ScheduledSparkApplicationCollector struct {
// contains filtered or unexported fields
}
ScheduledSparkApplicationCollector watches for ScheduledSparkApplication resources
func NewScheduledSparkApplicationCollector ¶ added in v0.0.56
func NewScheduledSparkApplicationCollector( dynamicClient dynamic.Interface, namespaces []string, excludedApplications []ExcludedScheduledSparkApplication, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ScheduledSparkApplicationCollector
NewScheduledSparkApplicationCollector creates a new collector for ScheduledSparkApplication resources
func (*ScheduledSparkApplicationCollector) AddResource ¶ added in v0.0.56
func (c *ScheduledSparkApplicationCollector) AddResource(resource interface{}) error
AddResource manually adds a ScheduledSparkApplication resource to be processed by the collector
func (*ScheduledSparkApplicationCollector) GetResourceChannel ¶ added in v0.0.56
func (c *ScheduledSparkApplicationCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ScheduledSparkApplicationCollector) GetType ¶ added in v0.0.56
func (c *ScheduledSparkApplicationCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ScheduledSparkApplicationCollector) IsAvailable ¶ added in v0.0.56
func (c *ScheduledSparkApplicationCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if ScheduledSparkApplication resources can be accessed in the cluster
func (*ScheduledSparkApplicationCollector) Start ¶ added in v0.0.56
func (c *ScheduledSparkApplicationCollector) Start(ctx context.Context) error
Start begins the ScheduledSparkApplication resources collection process
func (*ScheduledSparkApplicationCollector) Stop ¶ added in v0.0.56
func (c *ScheduledSparkApplicationCollector) Stop() error
Stop gracefully shuts down the ScheduledSparkApplication collector
type ServiceAccountCollector ¶
type ServiceAccountCollector struct {
// contains filtered or unexported fields
}
ServiceAccountCollector watches for serviceaccount events and collects serviceaccount data
func NewServiceAccountCollector ¶
func NewServiceAccountCollector( client kubernetes.Interface, namespaces []string, excludedServiceAccounts []ExcludedServiceAccount, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ServiceAccountCollector
NewServiceAccountCollector creates a new collector for serviceaccount resources
func (*ServiceAccountCollector) AddResource ¶
func (c *ServiceAccountCollector) AddResource(resource interface{}) error
AddResource manually adds a ServiceAccount resource to be processed by the collector
func (*ServiceAccountCollector) GetResourceChannel ¶
func (c *ServiceAccountCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ServiceAccountCollector) GetType ¶
func (c *ServiceAccountCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ServiceAccountCollector) IsAvailable ¶
func (c *ServiceAccountCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if ServiceAccount resources can be accessed in the cluster
func (*ServiceAccountCollector) Start ¶
func (c *ServiceAccountCollector) Start(ctx context.Context) error
Start begins the serviceaccount collection process
func (*ServiceAccountCollector) Stop ¶
func (c *ServiceAccountCollector) Stop() error
Stop gracefully shuts down the serviceaccount collector
type ServiceCollector ¶
type ServiceCollector struct {
// contains filtered or unexported fields
}
ServiceCollector watches for service events and collects service data
func NewServiceCollector ¶
func NewServiceCollector( client kubernetes.Interface, namespaces []string, excludedServices []ExcludedService, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *ServiceCollector
NewServiceCollector creates a new collector for service resources
func (*ServiceCollector) AddResource ¶
func (c *ServiceCollector) AddResource(resource interface{}) error
AddResource manually adds a service resource to be processed by the collector
func (*ServiceCollector) GetResourceChannel ¶
func (c *ServiceCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*ServiceCollector) GetType ¶
func (c *ServiceCollector) GetType() string
GetType returns the type of resource this collector handles
func (*ServiceCollector) IsAvailable ¶
func (c *ServiceCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Service resources can be accessed in the cluster
func (*ServiceCollector) Start ¶
func (c *ServiceCollector) Start(ctx context.Context) error
Start begins the service collection process
func (*ServiceCollector) Stop ¶
func (c *ServiceCollector) Stop() error
Stop gracefully shuts down the service collector
type SparkApplicationCollector ¶ added in v0.0.56
type SparkApplicationCollector struct {
// contains filtered or unexported fields
}
SparkApplicationCollector watches for SparkApplication resources
func NewSparkApplicationCollector ¶ added in v0.0.56
func NewSparkApplicationCollector( dynamicClient dynamic.Interface, namespaces []string, excludedApplications []ExcludedSparkApplication, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *SparkApplicationCollector
NewSparkApplicationCollector creates a new collector for SparkApplication resources
func (*SparkApplicationCollector) AddResource ¶ added in v0.0.56
func (c *SparkApplicationCollector) AddResource(resource interface{}) error
AddResource manually adds a SparkApplication resource to be processed by the collector
func (*SparkApplicationCollector) GetResourceChannel ¶ added in v0.0.56
func (c *SparkApplicationCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*SparkApplicationCollector) GetType ¶ added in v0.0.56
func (c *SparkApplicationCollector) GetType() string
GetType returns the type of resource this collector handles
func (*SparkApplicationCollector) IsAvailable ¶ added in v0.0.56
func (c *SparkApplicationCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if SparkApplication resources can be accessed in the cluster
func (*SparkApplicationCollector) Start ¶ added in v0.0.56
func (c *SparkApplicationCollector) Start(ctx context.Context) error
Start begins the SparkApplication resources collection process
func (*SparkApplicationCollector) Stop ¶ added in v0.0.56
func (c *SparkApplicationCollector) Stop() error
Stop gracefully shuts down the SparkApplication collector
type StatefulSetCollector ¶
type StatefulSetCollector struct {
// contains filtered or unexported fields
}
StatefulSetCollector watches for statefulset events and collects statefulset data
func NewStatefulSetCollector ¶
func NewStatefulSetCollector( client kubernetes.Interface, namespaces []string, excludedStatefulSets []ExcludedStatefulSet, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *StatefulSetCollector
NewStatefulSetCollector creates a new collector for statefulset resources
func (*StatefulSetCollector) AddResource ¶
func (c *StatefulSetCollector) AddResource(resource interface{}) error
AddResource manually adds a StatefulSet resource to be processed by the collector
func (*StatefulSetCollector) GetResourceChannel ¶
func (c *StatefulSetCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*StatefulSetCollector) GetType ¶
func (c *StatefulSetCollector) GetType() string
GetType returns the type of resource this collector handles
func (*StatefulSetCollector) IsAvailable ¶
func (c *StatefulSetCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if StatefulSet resources can be accessed in the cluster
func (*StatefulSetCollector) Start ¶
func (c *StatefulSetCollector) Start(ctx context.Context) error
Start begins the statefulset collection process
func (*StatefulSetCollector) Stop ¶
func (c *StatefulSetCollector) Stop() error
Stop gracefully shuts down the statefulset collector
type StorageClassCollector ¶
type StorageClassCollector struct {
// contains filtered or unexported fields
}
StorageClassCollector watches for StorageClass events and collects StorageClass data
func NewStorageClassCollector ¶
func NewStorageClassCollector( client kubernetes.Interface, excludedStorageClasses []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *StorageClassCollector
NewStorageClassCollector creates a new collector for StorageClass resources
func (*StorageClassCollector) AddResource ¶
func (c *StorageClassCollector) AddResource(resource interface{}) error
AddResource manually adds a storage class resource to be processed by the collector
func (*StorageClassCollector) GetResourceChannel ¶
func (c *StorageClassCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*StorageClassCollector) GetType ¶
func (c *StorageClassCollector) GetType() string
GetType returns the type of resource this collector handles
func (*StorageClassCollector) IsAvailable ¶
func (c *StorageClassCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if StorageClass resources can be accessed in the cluster
func (*StorageClassCollector) Start ¶
func (c *StorageClassCollector) Start(ctx context.Context) error
Start begins the StorageClass collection process
func (*StorageClassCollector) Stop ¶
func (c *StorageClassCollector) Stop() error
Stop gracefully shuts down the StorageClass collector
type TelemetryMetrics ¶
type TelemetryMetrics struct {
// RequestDuration captures the duration of Prometheus API calls
RequestDuration *prometheus.HistogramVec
MessagesIngested *prometheus.CounterVec
MessagesSent *prometheus.CounterVec
MessagesDropped *prometheus.CounterVec
AllMetrics []ResettableCollector
}
TelemetryMetrics holds Prometheus metrics for the collector
func NewTelemetryMetrics ¶
func NewTelemetryMetrics() *TelemetryMetrics
NewTelemetryMetrics creates and registers Prometheus metrics
type VerticalPodAutoscalerCollector ¶
type VerticalPodAutoscalerCollector struct {
// contains filtered or unexported fields
}
VerticalPodAutoscalerCollector watches for VPA events and collects VPA data
func NewVerticalPodAutoscalerCollector ¶
func NewVerticalPodAutoscalerCollector( client dynamic.Interface, namespaces []string, excludedVPAs []ExcludedVPA, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *VerticalPodAutoscalerCollector
NewVerticalPodAutoscalerCollector creates a new collector for VPA resources
func (*VerticalPodAutoscalerCollector) AddResource ¶
func (c *VerticalPodAutoscalerCollector) AddResource(resource interface{}) error
AddResource manually adds a VPA resource to be processed by the collector
func (*VerticalPodAutoscalerCollector) GetResourceChannel ¶
func (c *VerticalPodAutoscalerCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*VerticalPodAutoscalerCollector) GetType ¶
func (c *VerticalPodAutoscalerCollector) GetType() string
GetType returns the type of resource this collector handles
func (*VerticalPodAutoscalerCollector) IsAvailable ¶
func (c *VerticalPodAutoscalerCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if VPA resources are available in the cluster
func (*VerticalPodAutoscalerCollector) Start ¶
func (c *VerticalPodAutoscalerCollector) Start(ctx context.Context) error
Start begins the VPA collection process
func (*VerticalPodAutoscalerCollector) Stop ¶
func (c *VerticalPodAutoscalerCollector) Stop() error
Stop gracefully shuts down the VPA collector
type VolcanoJobCollector ¶
type VolcanoJobCollector struct {
// contains filtered or unexported fields
}
VolcanoJobCollector watches for Volcano Job resources
func NewVolcanoJobCollector ¶
func NewVolcanoJobCollector( dynamicClient dynamic.Interface, namespaces []string, excludedJobs []ExcludedVolcanoJob, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *VolcanoJobCollector
NewVolcanoJobCollector creates a new collector for Volcano Job resources
func (*VolcanoJobCollector) AddResource ¶
func (c *VolcanoJobCollector) AddResource(resource interface{}) error
AddResource manually adds a Volcano Job resource to be processed by the collector
func (*VolcanoJobCollector) GetResourceChannel ¶
func (c *VolcanoJobCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*VolcanoJobCollector) GetType ¶
func (c *VolcanoJobCollector) GetType() string
GetType returns the type of resource this collector handles
func (*VolcanoJobCollector) IsAvailable ¶
func (c *VolcanoJobCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if Volcano Job resources can be accessed in the cluster
func (*VolcanoJobCollector) Start ¶
func (c *VolcanoJobCollector) Start(ctx context.Context) error
Start begins the Volcano Job resources collection process
func (*VolcanoJobCollector) Stop ¶
func (c *VolcanoJobCollector) Stop() error
Stop gracefully shuts down the Volcano Job collector
type VolumeAttachmentCollector ¶
type VolumeAttachmentCollector struct {
// contains filtered or unexported fields
}
VolumeAttachmentCollector watches for VolumeAttachment events and collects VolumeAttachment data
func NewVolumeAttachmentCollector ¶
func NewVolumeAttachmentCollector( client kubernetes.Interface, excludedVolumeAttachments []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *VolumeAttachmentCollector
NewVolumeAttachmentCollector creates a new collector for VolumeAttachment resources
func (*VolumeAttachmentCollector) AddResource ¶
func (c *VolumeAttachmentCollector) AddResource(resource interface{}) error
AddResource manually adds a VolumeAttachment resource to be processed by the collector
func (*VolumeAttachmentCollector) GetResourceChannel ¶
func (c *VolumeAttachmentCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*VolumeAttachmentCollector) GetType ¶
func (c *VolumeAttachmentCollector) GetType() string
GetType returns the type of resource this collector handles
func (*VolumeAttachmentCollector) IsAvailable ¶
func (c *VolumeAttachmentCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if VolumeAttachment resources are available in the cluster
func (*VolumeAttachmentCollector) Start ¶
func (c *VolumeAttachmentCollector) Start(ctx context.Context) error
Start begins the VolumeAttachment collection process
func (*VolumeAttachmentCollector) Stop ¶
func (c *VolumeAttachmentCollector) Stop() error
Stop gracefully shuts down the VolumeAttachment collector
type WorkloadRecommendationCollector ¶ added in v0.0.61
type WorkloadRecommendationCollector struct {
// contains filtered or unexported fields
}
WorkloadRecommendationCollector watches for WorkloadRecommendation CRD events and collects data This collector sends in-cluster generated WorkloadRecommendations back to the control plane
func NewWorkloadRecommendationCollector ¶ added in v0.0.61
func NewWorkloadRecommendationCollector( client dynamic.Interface, namespaces []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *WorkloadRecommendationCollector
NewWorkloadRecommendationCollector creates a new collector for WorkloadRecommendation CRDs
func (*WorkloadRecommendationCollector) AddResource ¶ added in v0.0.61
func (c *WorkloadRecommendationCollector) AddResource(resource interface{}) error
AddResource manually adds a WorkloadRecommendation resource to be processed by the collector
func (*WorkloadRecommendationCollector) GetResourceChannel ¶ added in v0.0.61
func (c *WorkloadRecommendationCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*WorkloadRecommendationCollector) GetType ¶ added in v0.0.61
func (c *WorkloadRecommendationCollector) GetType() string
GetType returns the type of resource this collector handles
func (*WorkloadRecommendationCollector) IsAvailable ¶ added in v0.0.61
func (c *WorkloadRecommendationCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if WorkloadRecommendation CRD is available in the cluster
func (*WorkloadRecommendationCollector) Start ¶ added in v0.0.61
func (c *WorkloadRecommendationCollector) Start(ctx context.Context) error
Start begins the WorkloadRecommendation collection process
func (*WorkloadRecommendationCollector) Stop ¶ added in v0.0.61
func (c *WorkloadRecommendationCollector) Stop() error
Stop gracefully shuts down the WorkloadRecommendation collector
type WorkloadRuleCollector ¶ added in v0.0.62
type WorkloadRuleCollector struct {
// contains filtered or unexported fields
}
WorkloadRuleCollector watches WorkloadRule CRD status changes and sends OOM events back to the control plane via SendResourceBatch.
func NewWorkloadRuleCollector ¶ added in v0.0.62
func NewWorkloadRuleCollector( client dynamic.Interface, namespaces []string, maxBatchSize int, maxBatchTime time.Duration, logger logr.Logger, telemetryLogger telemetry_logger.Logger, ) *WorkloadRuleCollector
NewWorkloadRuleCollector creates a new collector for WorkloadRule CRDs
func (*WorkloadRuleCollector) AddResource ¶ added in v0.0.62
func (c *WorkloadRuleCollector) AddResource(resource interface{}) error
AddResource manually adds a WorkloadRule resource to be processed
func (*WorkloadRuleCollector) GetResourceChannel ¶ added in v0.0.62
func (c *WorkloadRuleCollector) GetResourceChannel() <-chan []CollectedResource
GetResourceChannel returns the channel for collected resource batches
func (*WorkloadRuleCollector) GetType ¶ added in v0.0.62
func (c *WorkloadRuleCollector) GetType() string
GetType returns the type of resource this collector handles
func (*WorkloadRuleCollector) IsAvailable ¶ added in v0.0.62
func (c *WorkloadRuleCollector) IsAvailable(ctx context.Context) bool
IsAvailable checks if the WorkloadRule CRD is available in the cluster
func (*WorkloadRuleCollector) Start ¶ added in v0.0.62
func (c *WorkloadRuleCollector) Start(ctx context.Context) error
Start begins the WorkloadRule collection process
func (*WorkloadRuleCollector) Stop ¶ added in v0.0.62
func (c *WorkloadRuleCollector) Stop() error
Stop gracefully shuts down the WorkloadRule collector
Source Files
¶
- argo_rollouts_collector.go
- batcher.go
- change_detector.go
- cluster_collector.go
- clusterrole_collector.go
- clusterrolebinding_collector.go
- cnpg_collector.go
- container_metrics.go
- container_resource_collector.go
- crd_collector.go
- cronjob_collector.go
- csidriver_collector.go
- csinode_collector.go
- csistoragecapacity_collector.go
- daemonset_collector.go
- datadog_collector.go
- deployment_collector.go
- endpoint_collector.go
- event_collector.go
- helper.go
- historical_metrics_collector.go
- horizontalpodautoscaler_collector.go
- ingress_collector.go
- ingressclass_collector.go
- interface.go
- job_collector.go
- karpenter_collector.go
- keda_scaled_job_collector.go
- keda_scaled_object_collector.go
- kubeflow_notebook_collector.go
- limitrange_collector.go
- manager.go
- metrics.go
- namespace_collector.go
- networkpolicy_collector.go
- node_collector.go
- persistentvolume_collector.go
- pod_collector.go
- poddisruptionbudget_collector.go
- pvc_collector.go
- pvc_metrics.go
- pvc_metrics_collector.go
- replicaset_collector.go
- replicationcontroller_collector.go
- resourcequota_collector.go
- role_collector.go
- rolebinding_collector.go
- scheduled_spark_application_collector.go
- service_collector.go
- serviceaccount_collector.go
- spark_application_collector.go
- statefulset_collector.go
- storageclass_collector.go
- types.go
- verticalpodautoscaler_collector.go
- volcano_job_collector.go
- volumeattachment_collector.go
- workload_recommendation_collector.go
- workload_rule_collector.go