kubernetes: k8s.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.


Package Files

doc.go replica_set.go replica_set_utils.go


const (
    // Realistic value of the burstReplica field for the replica set manager based off
    // performance requirements for kubernetes 1.0.
    BurstReplicas = 500

func GetCondition Uses

func GetCondition(status apps.ReplicaSetStatus, condType apps.ReplicaSetConditionType) *apps.ReplicaSetCondition

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

func NewReplicaSetCondition Uses

func NewReplicaSetCondition(condType apps.ReplicaSetConditionType, status v1.ConditionStatus, reason, msg string) apps.ReplicaSetCondition

NewReplicaSetCondition creates a new replicaset condition.

func RemoveCondition Uses

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

RemoveCondition removes the condition with the provided type from the replicaset status.

func SetCondition Uses

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

SetCondition adds/replaces the given condition in the replicaset 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.

type ReplicaSetController Uses

type ReplicaSetController struct {
    // GroupVersionKind indicates the controller type.
    // Different instances of this struct may handle different GVKs.
    // For example, this struct can be used (with adapters) to handle ReplicationController.
    // contains filtered or unexported fields

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

func NewBaseController Uses

func NewBaseController(rsInformer appsinformers.ReplicaSetInformer, podInformer coreinformers.PodInformer, kubeClient clientset.Interface, burstReplicas int,
    gvk schema.GroupVersionKind, metricOwnerName, queueName string, podControl controller.PodControlInterface) *ReplicaSetController

NewBaseController is the implementation of NewReplicaSetController with additional injected parameters so that it can also serve as the implementation of NewReplicationController.

func NewReplicaSetController Uses

func NewReplicaSetController(rsInformer appsinformers.ReplicaSetInformer, podInformer coreinformers.PodInformer, kubeClient clientset.Interface, burstReplicas int) *ReplicaSetController

NewReplicaSetController configures a replica set controller with the specified event recorder

func (*ReplicaSetController) Run Uses

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

Run begins watching and syncing.

func (*ReplicaSetController) SetEventRecorder Uses

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

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



Package replicaset imports 32 packages (graph) and is imported by 179 packages. Updated 2020-09-19. Refresh now. Tools for package owners.