kubernetesk8s.io/kubernetes/pkg/controller/garbagecollector Index | Files | Directories

package garbagecollector

import "k8s.io/kubernetes/pkg/controller/garbagecollector"

Index

Constants

const (
	GarbageCollectSubsystem    = "garbage_collector"
	EventProcessingLatencyKey  = "event_processing_latency_microseconds"
	DirtyProcessingLatencyKey  = "dirty_processing_latency_microseconds"
	OrphanProcessingLatencyKey = "orphan_processing_latency_microseconds"
)
const ResourceResyncTime time.Duration = 0

Variables

var (
	EventProcessingLatency = prometheus.NewSummary(
		prometheus.SummaryOpts{
			Subsystem: GarbageCollectSubsystem,
			Name:      EventProcessingLatencyKey,
			Help:      "Time in microseconds of an event spend in the eventQueue",
		},
	)
	DirtyProcessingLatency = prometheus.NewSummary(
		prometheus.SummaryOpts{
			Subsystem: GarbageCollectSubsystem,
			Name:      DirtyProcessingLatencyKey,
			Help:      "Time in microseconds of an item spend in the dirtyQueue",
		},
	)
	OrphanProcessingLatency = prometheus.NewSummary(
		prometheus.SummaryOpts{
			Subsystem: GarbageCollectSubsystem,
			Name:      OrphanProcessingLatencyKey,
			Help:      "Time in microseconds of an item spend in the orphanQueue",
		},
	)
)

Functions

func Register

func Register()

Register all metrics.

Types

type GarbageCollector

type GarbageCollector struct {
	// contains filtered or unexported fields
}

GarbageCollector is responsible for carrying out cascading deletion, and removing ownerReferences from the dependents if the owner is deleted with DeleteOptions.OrphanDependents=true.

func NewGarbageCollector

func NewGarbageCollector(metaOnlyClientPool dynamic.ClientPool, clientPool dynamic.ClientPool, resources []unversioned.GroupVersionResource) (*GarbageCollector, error)

func (*GarbageCollector) GraphHasUID

func (gc *GarbageCollector) GraphHasUID(UIDs []types.UID) bool

*FOR TEST USE ONLY* It's not safe to call this function when the GC is still busy. GraphHasUID returns if the Propagator has a particular UID store in its uidToNode graph. It's useful for debugging.

func (*GarbageCollector) QueuesDrained

func (gc *GarbageCollector) QueuesDrained() bool

QueueDrained returns if the dirtyQueue and eventQueue are drained. It's useful for debugging. Note that it doesn't guarantee the workers are idle.

func (*GarbageCollector) Run

func (gc *GarbageCollector) Run(workers int, stopCh <-chan struct{})

type Propagator

type Propagator struct {
	// contains filtered or unexported fields
}

type RegisteredRateLimiter

type RegisteredRateLimiter struct {
	// contains filtered or unexported fields
}

RegisteredRateLimiter records the registered RateLimters to avoid duplication.

func NewRegisteredRateLimiter

func NewRegisteredRateLimiter(resources []unversioned.GroupVersionResource) *RegisteredRateLimiter

NewRegisteredRateLimiter returns a new RegisteredRateLimiater. TODO: NewRegisteredRateLimiter is not dynamic. We need to find a better way when GC dynamically change the resources it monitors.

type UIDCache

type UIDCache struct {
	// contains filtered or unexported fields
}

UIDCache is an LRU cache for uid.

func NewUIDCache

func NewUIDCache(maxCacheEntries int) *UIDCache

NewUIDCache returns a UIDCache.

func (*UIDCache) Add

func (c *UIDCache) Add(uid types.UID)

Add adds a uid to the cache.

func (*UIDCache) Has

func (c *UIDCache) Has(uid types.UID) bool

Has returns if a uid is in the cache.

Source Files

garbagecollector.go metrics.go rate_limiter_helper.go uid_cache.go

Directories

PathSynopsis
pkg/controller/garbagecollector/metaonly
Version
v1.4.2
Published
Oct 15, 2016
Platform
js/wasm
Imports
27 packages
Last checked
2 minutes ago

Tools for package owners.