package podgc
import "k8s.io/kubernetes/pkg/controller/podgc"
Package podgc contains a very simple pod "garbage collector" implementation, PodGCController, that runs in the controller manager. If the number of pods in terminated phases (right now either Failed or Succeeded) surpasses a configurable threshold, the controller will delete pods in terminated state until the system reaches the allowed threshold again. The PodGCController prioritizes pods to delete by sorting by creation timestamp and deleting the oldest objects first. The PodGCController will not delete non-terminated pods.
Index ¶
- type PodGCController
- func NewPodGC(ctx context.Context, kubeClient clientset.Interface, podInformer coreinformers.PodInformer, nodeInformer coreinformers.NodeInformer, terminatedPodThreshold int) *PodGCController
- func NewPodGCInternal(ctx context.Context, kubeClient clientset.Interface, podInformer coreinformers.PodInformer, nodeInformer coreinformers.NodeInformer, terminatedPodThreshold int, gcCheckPeriod, quarantineTime time.Duration) *PodGCController
- func (gcc *PodGCController) Run(ctx context.Context)
Types ¶
type PodGCController ¶
type PodGCController struct {
// contains filtered or unexported fields
}
func NewPodGC ¶
func NewPodGC(ctx context.Context, kubeClient clientset.Interface, podInformer coreinformers.PodInformer, nodeInformer coreinformers.NodeInformer, terminatedPodThreshold int) *PodGCController
func NewPodGCInternal ¶
func NewPodGCInternal(ctx context.Context, kubeClient clientset.Interface, podInformer coreinformers.PodInformer, nodeInformer coreinformers.NodeInformer, terminatedPodThreshold int, gcCheckPeriod, quarantineTime time.Duration) *PodGCController
This function is only intended for integration tests
func (*PodGCController) Run ¶
func (gcc *PodGCController) Run(ctx context.Context)
Source Files ¶
doc.go gc_controller.go
Directories ¶
Path | Synopsis |
---|---|
pkg/controller/podgc/config | |
pkg/controller/podgc/config/v1alpha1 | |
pkg/controller/podgc/metrics |
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 23 packages
- Last checked
- 3 hours ago –
Tools for package owners.