core

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: 14 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Control

type Control interface {
	// common
	IsInitializing() bool
	SetRevisionTemplate(revisionSpec map[string]interface{}, template map[string]interface{})
	ApplyRevisionPatch(patched []byte) (*appsv1alpha1.CloneSet, error)

	// scale
	IsReadyToScale() bool
	NewVersionedPods(currentCS, updateCS *appsv1alpha1.CloneSet,
		currentRevision, updateRevision string,
		expectedCreations, expectedCurrentCreations int,
		availableIDs []string,
	) ([]*v1.Pod, error)
	GetPodSpreadConstraint() []clonesetutils.PodSpreadConstraint

	// update
	IsPodUpdatePaused(pod *v1.Pod) bool
	IsPodUpdateReady(pod *v1.Pod, minReadySeconds int32) bool
	GetPodsSortFunc(pods []*v1.Pod, waitUpdateIndexes []int) func(i, j int) bool
	GetUpdateOptions() *inplaceupdate.UpdateOptions
	ExtraStatusCalculation(status *appsv1alpha1.CloneSetStatus, pods []*v1.Pod) error

	// validation
	ValidateCloneSetUpdate(oldCS, newCS *appsv1alpha1.CloneSet) error

	// event handler
	IgnorePodUpdateEvent(oldPod, newPod *v1.Pod) bool
}

func New

func New(cs *appsv1alpha1.CloneSet) Control

Jump to

Keyboard shortcuts

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