sync

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LengthOfInstanceID is the length of instance-id
	LengthOfInstanceID = 5
)

Variables

This section is empty.

Functions

func IsPodAvailable added in v1.2.0

func IsPodAvailable(coreControl clonesetcore.Control, pod *v1.Pod, minReadySeconds int32) bool

func SortUpdateIndexes

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

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

Types

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,
	) error
}

Interface for managing pods scaling and updating.

func New

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

type IsPodUpdateFunc added in v1.5.0

type IsPodUpdateFunc func(pod *v1.Pod, updateRevision string) bool

Jump to

Keyboard shortcuts

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