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

package replicaset

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

Package replicaset contains logic for watching and synchronizing ReplicaSets.

Index

Constants

const (
	// We'll attempt to recompute the required replicas of all ReplicaSets
	// 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 replica set 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
)

Functions

func GetCondition

GetCondition returns a replica set condition with the provided type if it exists.

func NewReplicaSetCondition

func NewReplicaSetCondition(condType extensions.ReplicaSetConditionType, status api.ConditionStatus, reason, msg string) extensions.ReplicaSetCondition

NewReplicaSetCondition creates a new replica set condition.

func RemoveCondition

func RemoveCondition(status *extensions.ReplicaSetStatus, condType extensions.ReplicaSetConditionType)

RemoveCondition removes the condition with the provided type from the replica set status.

func SetCondition

func SetCondition(status *extensions.ReplicaSetStatus, condition extensions.ReplicaSetCondition)

SetCondition adds/replaces the given condition in the replica set status. If the condition that we are about to add already exists and has the same status and reason then we are not going to update.

Types

type ReplicaSetController

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

ReplicaSetController is responsible for synchronizing ReplicaSet objects stored in the system with actual running pods.

func NewReplicaSetController

func NewReplicaSetController(rsInformer informers.ReplicaSetInformer, podInformer informers.PodInformer, kubeClient clientset.Interface, burstReplicas int, lookupCacheSize int, garbageCollectorEnabled bool) *ReplicaSetController

NewReplicaSetController configures a replica set controller with the specified event recorder

func (*ReplicaSetController) Run

func (rsc *ReplicaSetController) Run(workers int, stopCh <-chan struct{})

Run begins watching and syncing.

func (*ReplicaSetController) SetEventRecorder

func (rsc *ReplicaSetController) SetEventRecorder(recorder record.EventRecorder)

SetEventRecorder replaces the event recorder used by the ReplicaSetController with the given recorder. Only used for testing.

Source Files

doc.go replica_set.go replica_set_utils.go

Directories

PathSynopsis
pkg/controller/replicaset/options
Version
v1.5.4-beta.0
Published
Feb 15, 2017
Platform
js/wasm
Imports
24 packages
Last checked
7 minutes ago

Tools for package owners.