kubernetesk8s.io/kubernetes/pkg/controller/podgc/metrics Index | Files

package metrics

import "k8s.io/kubernetes/pkg/controller/podgc/metrics"

Index

Constants

const (

	// PodGCReasonTerminated is used when the pod is terminated.
	PodGCReasonTerminated = "terminated"
	// PodGCReasonCompleted is used when the pod is terminating and the corresponding node
	// is not ready and has `node.kubernetes.io/out-of-service` taint.
	PodGCReasonTerminatingOutOfService = "out-of-service"
	// PodGCReasonOrphaned is used when the pod is orphaned which means the corresponding node
	// has been deleted.
	PodGCReasonOrphaned = "orphaned"
	// PodGCReasonUnscheduled is used when the pod is terminating and unscheduled.
	PodGCReasonTerminatingUnscheduled = "unscheduled"
)

Variables

var (
	DeletingPodsTotal = metrics.NewCounterVec(
		&metrics.CounterOpts{
			Subsystem:      podGCController,
			Name:           "force_delete_pods_total",
			Help:           "Number of pods that are being forcefully deleted since the Pod GC Controller started.",
			StabilityLevel: metrics.ALPHA,
		},
		[]string{"namespace", "reason"},
	)
	DeletingPodsErrorTotal = metrics.NewCounterVec(
		&metrics.CounterOpts{
			Subsystem:      podGCController,
			Name:           "force_delete_pod_errors_total",
			Help:           "Number of errors encountered when forcefully deleting the pods since the Pod GC Controller started.",
			StabilityLevel: metrics.ALPHA,
		},
		[]string{"namespace", "reason"},
	)
)

Functions

func RegisterMetrics

func RegisterMetrics()

Register the metrics that are to be monitored.

Source Files

metrics.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
3 hours ago

Tools for package owners.