kubernetesk8s.io/kubernetes/pkg/controller/replication Index | Files

package replicationcontroller

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

Package replication contains logic for watching and synchronizing replication controllers.

Index

Constants

const (
	// We'll attempt to recompute the required replicas of all replication controllers
	// that have fulfilled their expectations at least this often. This recomputation
	// happens based on contents in local pod storage.
	FullControllerResyncPeriod = 30 * time.Second

	// Realistic value of the burstReplica field for the replication manager based off
	// performance requirements for kubernetes 1.0.
	BurstReplicas = 500

	// We must avoid counting pods until the pod store has synced. If it hasn't synced, to
	// avoid a hot loop, we'll wait this long between checks.
	PodStoreSyncedPollPeriod = 100 * time.Millisecond
)

Types

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(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc, burstReplicas int) *ReplicationManager

NewReplicationManager creates a new ReplicationManager.

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.

Source Files

doc.go replication_controller.go replication_controller_utils.go

Version
v1.1.2
Published
Nov 19, 2015
Platform
js/wasm
Imports
17 packages
Last checked
2 minutes ago

Tools for package owners.