sync

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LengthOfInstanceID is the length of instance-id
	LengthOfInstanceID = 5
)
View Source
const (
	// PodDeletionCost can be used to set to an int32 that represent the cost of deleting
	// a pod compared to other pods belonging to the same ReplicaSet. Pods with lower
	// deletion cost are preferred to be deleted before pods with higher deletion cost.
	PodDeletionCost = "controller.kubernetes.io/pod-deletion-cost"
)

Variables

This section is empty.

Functions

func SortUpdateIndexes

func SortUpdateIndexes(coreControl clonesetcore.Control, strategy appsv1alpha1.CloneSetUpdateStrategy, pods []*v1.Pod, waitUpdateIndexes []int) []int

SortUpdateIndexes sorts the given waitUpdateIndexes of Pods to update according to the CloneSet strategy.

Types

type ActivePodsWithDeletionCost

type ActivePodsWithDeletionCost []*v1.Pod

ActivePodsWithDeletionCost type allows custom sorting of pods so a controller can pick the best ones to delete.

func (ActivePodsWithDeletionCost) Len

func (ActivePodsWithDeletionCost) Less

func (s ActivePodsWithDeletionCost) Less(i, j int) bool

func (ActivePodsWithDeletionCost) Swap

func (s ActivePodsWithDeletionCost) Swap(i, j int)

type Interface

type Interface interface {
	Scale(
		currentCS, updateCS *appsv1alpha1.CloneSet,
		currentRevision, updateRevision string,
		pods []*v1.Pod, pvcs []*v1.PersistentVolumeClaim,
	) (bool, error)

	Update(cs *appsv1alpha1.CloneSet,
		currentRevision, updateRevision *apps.ControllerRevision, revisions []*apps.ControllerRevision,
		pods []*v1.Pod, pvcs []*v1.PersistentVolumeClaim,
	) (time.Duration, error)
}

Interface for managing pods scaleing and updating.

func New

func New(c client.Client, recorder record.EventRecorder) Interface

Jump to

Keyboard shortcuts

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