replicaset

package
v1.27.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 33 Imported by: 145

Documentation

Overview

Package replicaset contains logic for watching and synchronizing ReplicaSets.

Index

Constants

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

Variables

This section is empty.

Functions

func GetCondition added in v1.5.0

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

func NewReplicaSetCondition added in v1.5.0

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

NewReplicaSetCondition creates a new replicaset condition.

func RemoveCondition added in v1.5.0

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

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

func SetCondition added in v1.5.0

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.

Types

type ReplicaSetController

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.
	schema.GroupVersionKind
	// contains filtered or unexported fields
}

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

func NewBaseController added in v1.9.0

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

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

func NewReplicaSetController

func NewReplicaSetController(logger klog.Logger, 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

func (rsc *ReplicaSetController) Run(ctx context.Context, workers int)

Run begins watching and syncing.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL