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
- func NewScheduler(ctx context.Context, namespace, name string, lister scheduler.VPodLister, ...) scheduler.Scheduler
- func NewStatefulSetScheduler(ctx context.Context, namespace, name string, lister scheduler.VPodLister, ...) scheduler.Scheduler
- type Autoscaler
- type SchedulerPolicyType
- type StatefulSetScheduler
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
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 ¶
func (s *StatefulSetScheduler) Schedule(vpod scheduler.VPod) ([]duckv1alpha1.Placement, error)
Click to show internal directories.
Click to hide internal directories.