package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Packages
Package bootstrap provides automatic processes necessary for bootstraping.
Package certificates implements an abstract controller that is useful for building controllers that manage CSRs.
Package cronjob contains the controller for CronJob objects.
Package daemon contains logic for watching and synchronizing daemons.
Package deployment contains all the logic for handling Kubernetes Deployments.
Package endpoint provides EndpointController implementation to manage and sync service endpoints.
Package job contains logic for watching and synchronizing jobs.
Package namespace contains a controller that handles namespace lifecycle.
Package nodeipam contains code for syncing cloud instances with node registry.
Package podautoscaler contains logic for autoscaling number of pods based on metrics observed.
Package podgc contains a very simple pod "garbage collector" implementation, PodGCController, that runs in the controller manager.
Package replicaset contains logic for watching and synchronizing ReplicaSets.
Package replication contains logic for watching and synchronizing replication controllers.
Package resourceclaim implements the controller part of https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/3063-dynamic-resource-allocation
It was derived from the generic ephemeral volume controller.
Package resourcequota contains a controller that makes resource quota usage observations.
Package serviceaccount provides implementations to manage service accounts and service account tokens.
Package tainteviction contains the logic implementing taint-based eviction for Pods running on Nodes with NoExecute taints.
# Functions
AddOrUpdateTaintOnNode add taints to the node.
ComputeHash returns a hash value calculated from pod template and a collisionCount to avoid hash collision.
FilterActivePods returns pods that have not terminated.
FilterActiveReplicaSets returns replica sets that have (or at least ought to have) pods.
FilterClaimedPods returns pods that are controlled by the controller and match the selector.
FilterReplicaSets returns replica sets that are filtered by filterFn (all returned ones should match filterFn).
NewControllerExpectations returns a store for ControllerExpectations.
NewControllerRevisionControllerRefManager returns a ControllerRevisionControllerRefManager that exposes methods to manage the controllerRef of ControllerRevisions.
NewPodControllerRefManager returns a PodControllerRefManager that exposes methods to manage the controllerRef of pods.
NewReplicaSetControllerRefManager returns a ReplicaSetControllerRefManager that exposes methods to manage the controllerRef of ReplicaSets.
NewUIDTrackingControllerExpectations returns a wrapper around ControllerExpectations that is aware of deleteKeys.
Returns 0 for resyncPeriod in case resyncing is not needed.
PatchNodeTaints patches node's taints.
PodKey returns a key unique to the given pod within a cluster.
RecheckDeletionTimestamp returns a CanAdopt() function to recheck deletion.
RemoveTaintOffNode is for cleaning up taints temporarily added to node, won't fail if target taint doesn't exist or has been removed.
StaticResyncPeriodFunc returns the resync period specified.
# Constants
If a watch drops a delete event for a pod, it'll take this long before a dormant controller waiting for those packets is woken up anyway.
FailedCreatePodReason is added in an event and in a replica set condition when a pod for a replica set is failed to be created.
FailedDeletePodReason is added in an event and in a replica set condition when a pod for a replica set is failed to be deleted.
When batching pod creates, SlowStartInitialBatchSize is the size of the initial batch.
SuccessfulCreatePodReason is added in an event when a pod for a replica set is successfully created.
SuccessfulDeletePodReason is added in an event when a pod for a replica set is successfully deleted.
# Variables
ExpKeyFunc to parse out the key from a ControlleeExpectation.
UIDSetKeyFunc to parse out the key from a UIDSet.
# Structs
ActivePodsWithRanks is a sortable list of pods and a list of corresponding ranks which will be considered during sorting.
ControlleeExpectations track controllee creates/deletes.
ControllerExpectations is a cache mapping controllers to what they expect to see before being woken up for a sync.
ControllerRevisionControllerRefManager is used to manage controllerRef of ControllerRevisions.
RealControllerRevisionControl is the default implementation of ControllerRevisionControlInterface.
RealPodControl is the default implementation of PodControlInterface.
RealRSControl is the default implementation of RSControllerInterface.
ReplicaSetControllerRefManager is used to manage controllerRef of ReplicaSets.
UIDSet holds a key and a set of UIDs.
UIDTrackingControllerExpectations tracks the UID of the pods it deletes.
# Interfaces
ControllerExpectationsInterface is an interface that allows users to set and wait on expectations.
TODO: merge the controller revision interface in controller_history.go with this one ControllerRevisionControlInterface is an interface that knows how to patch ControllerRevisions, as well as increment or decrement them.
PodControlInterface is an interface that knows how to add or delete pods created as an interface to allow testing.
RSControlInterface is an interface that knows how to add or delete ReplicaSets, as well as increment or decrement them.
# Type aliases
ActivePods type allows custom sorting of pods so a controller can pick the best ones to delete.
ByLogging allows custom sorting of pods so the best one can be picked for getting its logs.
ControllersByCreationTimestamp sorts a list of ReplicationControllers by creation timestamp, using their names as a tie breaker.
ReplicaSetsByCreationTimestamp sorts a list of ReplicaSet by creation timestamp, using their names as a tie breaker.
ReplicaSetsBySizeNewer sorts a list of ReplicaSet by size in descending order, using their creation timestamp or name as a tie breaker.
ReplicaSetsBySizeOlder sorts a list of ReplicaSet by size in descending order, using their creation timestamp or name as a tie breaker.