Documentation ¶
Index ¶
- Constants
- type ActivePodsForDeletion
- type ContainerStatus
- type GenericPodUpdater
- func (u *GenericPodUpdater) BeginUpdatePod(resources *collasetutils.RelatedResources, podCh chan *PodUpdateInfo) (bool, error)
- func (u *GenericPodUpdater) FilterAllowOpsPods(podToUpdate []*PodUpdateInfo, ownedIDs map[int]*appsv1alpha1.ContextDetail, ...) (*time.Duration, error)
- func (u *GenericPodUpdater) FinishUpdatePod(podInfo *PodUpdateInfo) error
- type Interface
- type PodStatus
- type PodUpdateInfo
- type PodUpdater
- type RealSyncControl
- func (r *RealSyncControl) Scale(ctx context.Context, cls *appsv1alpha1.CollaSet, ...) (bool, *time.Duration, error)
- func (r *RealSyncControl) SyncPods(ctx context.Context, instance *appsv1alpha1.CollaSet, ...) (bool, []*collasetutils.PodWrapper, map[int]*appsv1alpha1.ContextDetail, error)
- func (r *RealSyncControl) Update(ctx context.Context, cls *appsv1alpha1.CollaSet, ...) (bool, *time.Duration, error)
Constants ¶
View Source
const (
ScaleInContextDataKey = "ScaleIn"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivePodsForDeletion ¶
type ActivePodsForDeletion []*collasetutils.PodWrapper
func (ActivePodsForDeletion) Len ¶
func (s ActivePodsForDeletion) Len() int
func (ActivePodsForDeletion) Less ¶
func (s ActivePodsForDeletion) Less(i, j int) bool
func (ActivePodsForDeletion) Swap ¶
func (s ActivePodsForDeletion) Swap(i, j int)
type ContainerStatus ¶
type GenericPodUpdater ¶ added in v0.4.0
func (*GenericPodUpdater) BeginUpdatePod ¶ added in v0.4.0
func (u *GenericPodUpdater) BeginUpdatePod(resources *collasetutils.RelatedResources, podCh chan *PodUpdateInfo) (bool, error)
func (*GenericPodUpdater) FilterAllowOpsPods ¶ added in v0.4.0
func (u *GenericPodUpdater) FilterAllowOpsPods(podToUpdate []*PodUpdateInfo, ownedIDs map[int]*appsv1alpha1.ContextDetail, resources *collasetutils.RelatedResources, podCh chan *PodUpdateInfo) (*time.Duration, error)
func (*GenericPodUpdater) FinishUpdatePod ¶ added in v0.4.0
func (u *GenericPodUpdater) FinishUpdatePod(podInfo *PodUpdateInfo) error
type Interface ¶
type Interface interface { SyncPods( ctx context.Context, instance *appsv1alpha1.CollaSet, resources *collasetutils.RelatedResources, ) (bool, []*collasetutils.PodWrapper, map[int]*appsv1alpha1.ContextDetail, error) Scale( ctx context.Context, instance *appsv1alpha1.CollaSet, resources *collasetutils.RelatedResources, filteredPods []*collasetutils.PodWrapper, ownedIDs map[int]*appsv1alpha1.ContextDetail, ) (bool, *time.Duration, error) Update( ctx context.Context, instance *appsv1alpha1.CollaSet, resources *collasetutils.RelatedResources, filteredPods []*collasetutils.PodWrapper, ownedIDs map[int]*appsv1alpha1.ContextDetail, ) (bool, *time.Duration, error) }
func NewRealSyncControl ¶
func NewRealSyncControl(client client.Client, logger logr.Logger, podControl podcontrol.Interface, pvcControl pvccontrol.Interface, recorder record.EventRecorder) Interface
type PodStatus ¶
type PodStatus struct {
ContainerStates map[string]*ContainerStatus `json:"containerStates,omitempty"`
}
type PodUpdateInfo ¶
type PodUpdateInfo struct { *utils.PodWrapper UpdatedPod *corev1.Pod InPlaceUpdateSupport bool OnlyMetadataChanged bool // indicate if this pod has up-to-date revision from its owner, like CollaSet IsUpdatedRevision bool // carry the pod's current revision CurrentRevision *appsv1.ControllerRevision // carry the desired update revision UpdateRevision *appsv1.ControllerRevision // indicates effected PodDecorations changed PodDecorationChanged bool // indicate if the pvc template changed PvcTmpHashChanged bool CurrentPodDecorations map[string]*appsv1alpha1.PodDecoration UpdatedPodDecorations map[string]*appsv1alpha1.PodDecoration // contains filtered or unexported fields }
type PodUpdater ¶
type PodUpdater interface { FulfillPodUpdatedInfo(revision *appsv1.ControllerRevision, podUpdateInfo *PodUpdateInfo) error BeginUpdatePod(resources *collasetutils.RelatedResources, podCh chan *PodUpdateInfo) (bool, error) FilterAllowOpsPods(podToUpdate []*PodUpdateInfo, ownedIDs map[int]*appsv1alpha1.ContextDetail, resources *collasetutils.RelatedResources, podCh chan *PodUpdateInfo) (*time.Duration, error) UpgradePod(podInfo *PodUpdateInfo) error GetPodUpdateFinishStatus(podUpdateInfo *PodUpdateInfo) (bool, string, error) FinishUpdatePod(podInfo *PodUpdateInfo) error }
type RealSyncControl ¶
type RealSyncControl struct {
// contains filtered or unexported fields
}
func (*RealSyncControl) Scale ¶
func (r *RealSyncControl) Scale( ctx context.Context, cls *appsv1alpha1.CollaSet, resources *collasetutils.RelatedResources, podWrappers []*collasetutils.PodWrapper, ownedIDs map[int]*appsv1alpha1.ContextDetail, ) (bool, *time.Duration, error)
func (*RealSyncControl) SyncPods ¶
func (r *RealSyncControl) SyncPods( ctx context.Context, instance *appsv1alpha1.CollaSet, resources *collasetutils.RelatedResources, ) ( bool, []*collasetutils.PodWrapper, map[int]*appsv1alpha1.ContextDetail, error)
SyncPods is used to reclaim Pod instance ID
func (*RealSyncControl) Update ¶
func (r *RealSyncControl) Update( ctx context.Context, cls *appsv1alpha1.CollaSet, resources *collasetutils.RelatedResources, podWrappers []*collasetutils.PodWrapper, ownedIDs map[int]*appsv1alpha1.ContextDetail, ) (bool, *time.Duration, error)
Click to show internal directories.
Click to hide internal directories.