statefulset

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Copyright 2020 The Knative Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	ZoneLabel = "topology.kubernetes.io/zone"
)

Variables

This section is empty.

Functions

func NewScheduler added in v0.22.0

func NewScheduler(ctx context.Context,
	namespace, name string,
	lister scheduler.VPodLister,
	refreshPeriod time.Duration,
	capacity int32,
	schedulerPolicy SchedulerPolicyType,
	nodeLister corev1listers.NodeLister,
	evictor scheduler.Evictor) scheduler.Scheduler

NewScheduler creates a new scheduler with pod autoscaling enabled.

func NewStatefulSetScheduler

func NewStatefulSetScheduler(ctx context.Context,
	namespace, name string,
	lister scheduler.VPodLister,
	stateAccessor stateAccessor,
	autoscaler Autoscaler, podlister corev1listers.PodNamespaceLister) scheduler.Scheduler

Types

type Autoscaler added in v0.22.0

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

	// Autoscale is used to immediately trigger the autoscaler with the hint
	// that pending number of vreplicas couldn't be scheduled.
	Autoscale(pending int32)
}

func NewAutoscaler added in v0.22.0

func NewAutoscaler(ctx context.Context,
	namespace, name string,
	lister scheduler.VPodLister,
	stateAccessor stateAccessor,
	evictor scheduler.Evictor,
	refreshPeriod time.Duration,
	capacity int32) Autoscaler

type SchedulerPolicyType added in v0.23.0

type SchedulerPolicyType string
const (
	// MAXFILLUP policy type adds replicas to existing pods to fill them up before adding to new pods
	MAXFILLUP SchedulerPolicyType = "MAXFILLUP"
	// EVENSPREAD policy type spreads replicas uniformly across failure-domains such as regions, zones, nodes, etc
	EVENSPREAD = "EVENSPREAD"
)

type StatefulSetScheduler

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

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

func (*StatefulSetScheduler) Schedule

Jump to

Keyboard shortcuts

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