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 ¶
ActivePodsWithDeletionCost type allows custom sorting of pods so a controller can pick the best ones to delete.
func (ActivePodsWithDeletionCost) Len ¶
func (s ActivePodsWithDeletionCost) Len() int
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.
Click to show internal directories.
Click to hide internal directories.