Documentation ¶
Overview ¶
Package replication contains logic for watching and synchronizing replication controllers.
Index ¶
- Constants
- func GetCondition(status v1.ReplicationControllerStatus, ...) *v1.ReplicationControllerCondition
- func NewReplicationControllerCondition(condType v1.ReplicationControllerConditionType, status v1.ConditionStatus, ...) v1.ReplicationControllerCondition
- func RemoveCondition(status *v1.ReplicationControllerStatus, ...)
- func SetCondition(status *v1.ReplicationControllerStatus, ...)
- type OverlappingControllers
- type ReplicationManager
Constants ¶
const ( // Realistic value of the burstReplica field for the replication manager based off // performance requirements for kubernetes 1.0. BurstReplicas = 500 )
Variables ¶
This section is empty.
Functions ¶
func GetCondition ¶ added in v1.5.0
func GetCondition(status v1.ReplicationControllerStatus, condType v1.ReplicationControllerConditionType) *v1.ReplicationControllerCondition
GetCondition returns a replication controller condition with the provided type if it exists.
func NewReplicationControllerCondition ¶ added in v1.5.0
func NewReplicationControllerCondition(condType v1.ReplicationControllerConditionType, status v1.ConditionStatus, reason, msg string) v1.ReplicationControllerCondition
NewReplicationControllerCondition creates a new replication controller condition.
func RemoveCondition ¶ added in v1.5.0
func RemoveCondition(status *v1.ReplicationControllerStatus, condType v1.ReplicationControllerConditionType)
RemoveCondition removes the condition with the provided type from the replication controller status.
func SetCondition ¶ added in v1.5.0
func SetCondition(status *v1.ReplicationControllerStatus, condition v1.ReplicationControllerCondition)
SetCondition adds/replaces the given condition in the replication controller status.
Types ¶
type OverlappingControllers ¶ added in v1.2.0
type OverlappingControllers []*v1.ReplicationController
OverlappingControllers sorts a list of controllers by creation timestamp, using their names as a tie breaker.
func (OverlappingControllers) Len ¶ added in v1.2.0
func (o OverlappingControllers) Len() int
func (OverlappingControllers) Less ¶ added in v1.2.0
func (o OverlappingControllers) Less(i, j int) bool
func (OverlappingControllers) Swap ¶ added in v1.2.0
func (o OverlappingControllers) Swap(i, j int)
type ReplicationManager ¶
type ReplicationManager struct {
// contains filtered or unexported fields
}
ReplicationManager is responsible for synchronizing ReplicationController objects stored in the system with actual running pods. TODO: this really should be called ReplicationController. The only reason why it's a Manager is to distinguish this type from API object "ReplicationController". We should fix this.
func NewReplicationManager ¶
func NewReplicationManager(podInformer, rcInformer cache.SharedIndexInformer, kubeClient clientset.Interface, burstReplicas int, lookupCacheSize int, garbageCollectorEnabled bool) *ReplicationManager
NewReplicationManager configures a replication manager with the specified event recorder
func NewReplicationManagerFromClient ¶ added in v1.3.0
func NewReplicationManagerFromClient(kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFunc, burstReplicas int, lookupCacheSize int) *ReplicationManager
NewReplicationManagerFromClient creates a new ReplicationManager that runs its own informer.
func (*ReplicationManager) Run ¶
func (rm *ReplicationManager) Run(workers int, stopCh <-chan struct{})
Run begins watching and syncing.
func (*ReplicationManager) SetEventRecorder ¶
func (rm *ReplicationManager) SetEventRecorder(recorder record.EventRecorder)
SetEventRecorder replaces the event recorder used by the replication manager with the given recorder. Only used for testing.