framework

package
v3.11.0-alpha.0+incomp... Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterCapacityReviewPrint

func ClusterCapacityReviewPrint(r *ClusterCapacityReview, verbose bool, format string) error

func SchedulerConfigLocal

func SchedulerConfigLocal(s *sapps.SchedulerServer) (*scheduler.Config, error)

SchedulerConfig creates the scheduler configuration.

Types

type ClusterCapacity

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

func New

func New(schedServer *sapps.SchedulerServer, simulatedPod *v1.Pod, maxPods int) (*ClusterCapacity, error)

Create new cluster capacity analysis The analysis is completely independent of apiserver so no need for kubeconfig nor for apiserver url

func (*ClusterCapacity) Bind

func (c *ClusterCapacity) Bind(binding *v1.Binding, schedulerName string) error

func (*ClusterCapacity) Close

func (c *ClusterCapacity) Close()

func (*ClusterCapacity) Report

func (*ClusterCapacity) Run

func (c *ClusterCapacity) Run() error

func (*ClusterCapacity) SyncWithClient

func (c *ClusterCapacity) SyncWithClient(client externalclientset.Interface) error

func (*ClusterCapacity) SyncWithStore

func (c *ClusterCapacity) SyncWithStore(resourceStore store.ResourceStore) error

func (*ClusterCapacity) Update

func (c *ClusterCapacity) Update(pod *v1.Pod, podCondition *v1.PodCondition, schedulerName string) error

type ClusterCapacityReview

type ClusterCapacityReview struct {
	unversioned.TypeMeta
	Spec   ClusterCapacityReviewSpec
	Status ClusterCapacityReviewStatus
}

func GetReport

func GetReport(pods []*v1.Pod, status Status) *ClusterCapacityReview

type ClusterCapacityReviewResult

type ClusterCapacityReviewResult struct {
	PodName string
	// numbers of replicas on nodes
	ReplicasOnNodes []*ReplicasOnNode
	// reason why no more pods could schedule (if any on this node)
	FailSummary []FailReasonSummary
}

type ClusterCapacityReviewScheduleFailReason

type ClusterCapacityReviewScheduleFailReason struct {
	FailType    string
	FailMessage string
}

type ClusterCapacityReviewSpec

type ClusterCapacityReviewSpec struct {
	// the pod desired for scheduling
	Templates []v1.Pod

	// desired number of replicas that should be scheduled
	// +optional
	Replicas int32

	PodRequirements []*Requirements
}

type ClusterCapacityReviewStatus

type ClusterCapacityReviewStatus struct {
	CreationTimestamp time.Time
	// actual number of replicas that could schedule
	Replicas int32

	FailReason *ClusterCapacityReviewScheduleFailReason

	// per node information about the scheduling simulation
	Pods []*ClusterCapacityReviewResult
}

type FailReasonSummary

type FailReasonSummary struct {
	Reason string
	Count  int
}

type ReplicasOnNode

type ReplicasOnNode struct {
	NodeName string
	Replicas int
}

type Requirements

type Requirements struct {
	PodName       string
	Resources     *Resources
	NodeSelectors map[string]string
}

type Resources

type Resources struct {
	PrimaryResources v1.ResourceList
	ScalarResources  map[v1.ResourceName]int64
}

type Status

type Status struct {
	Pods       []*v1.Pod
	StopReason string
}

capture all scheduled pods with reason why the analysis could not continue

Directories

Path Synopsis
restclient

Jump to

Keyboard shortcuts

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