statefulset

package
v0.43.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 25 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.35.6

func New(ctx context.Context, cfg *Config) (scheduler.Scheduler, error)

Types

type Autoscaler

type Autoscaler interface {
	// Start runs the autoscaler until cancelled.
	Start(ctx context.Context)

	// Autoscale is used to immediately trigger the autoscaler.
	Autoscale(ctx context.Context)
}

type Config added in v0.35.6

type Config struct {
	StatefulSetNamespace string `json:"statefulSetNamespace"`
	StatefulSetName      string `json:"statefulSetName"`

	ScaleCacheConfig scheduler.ScaleCacheConfig `json:"scaleCacheConfig"`
	// PodCapacity max capacity for each StatefulSet's pod.
	PodCapacity int32 `json:"podCapacity"`
	// MinReplicas is the minimum replicas of the statefulset.
	MinReplicas int32 `json:"minReplicas"`
	// Autoscaler refresh period
	RefreshPeriod time.Duration `json:"refreshPeriod"`
	// Autoscaler retry period
	RetryPeriod time.Duration `json:"retryPeriod"`

	Evictor scheduler.Evictor `json:"-"`

	VPodLister scheduler.VPodLister `json:"-"`
	// Pod lister for statefulset: StatefulSetNamespace / StatefulSetName
	PodLister corev1listers.PodNamespaceLister `json:"-"`
	// contains filtered or unexported fields
}

type GetReserved added in v0.38.2

type GetReserved func() map[types.NamespacedName]map[string]int32

type Pending added in v0.38.2

type Pending map[types.NamespacedName]int32

type StatefulSetScheduler

type StatefulSetScheduler struct {
	// contains filtered or unexported fields
}

StatefulSetScheduler is a scheduler placing VPod into statefulset-managed set of pods

func (*StatefulSetScheduler) Demote added in v0.37.0

func (s *StatefulSetScheduler) Demote(b reconciler.Bucket)

Demote implements reconciler.LeaderAware.

func (*StatefulSetScheduler) Promote added in v0.37.0

Promote implements reconciler.LeaderAware.

func (*StatefulSetScheduler) Reserved added in v0.38.2

func (s *StatefulSetScheduler) Reserved() map[types.NamespacedName]map[string]int32

func (*StatefulSetScheduler) Schedule

Jump to

Keyboard shortcuts

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