capacityestimation

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCESimulatorExecutor

func NewCESimulatorExecutor(conf *options.CapacityEstimationConfig) (pkg.Simulator, error)

NewCESimulatorExecutor create a ce simulator which is completely independent of apiserver so no need for kubeconfig nor for apiserver url

Types

type CapacityEstimationReview

type CapacityEstimationReview struct {
	metav1.TypeMeta
	Spec   CapacityEstimationReviewSpec   `json:"spec"`
	Status CapacityEstimationReviewStatus `json:"status"`
}

func (*CapacityEstimationReview) Print

func (r *CapacityEstimationReview) Print(verbose bool, format string) error

type CapacityEstimationReviewResult

type CapacityEstimationReviewResult struct {
	PodName string `json:"podName"`
	// numbers of replicas on nodes
	ReplicasOnNodes []*ReplicasOnNode `json:"replicasOnNodes"`
	// reason why no more pods could schedule (if any on this node)
	Summary []StopReasonSummary `json:"summary"`
}

type CapacityEstimationReviewScheduleStopReason

type CapacityEstimationReviewScheduleStopReason struct {
	StopType    string `json:"stopType"`
	StopMessage string `json:"stopMessage"`
}

type CapacityEstimationReviewSpec

type CapacityEstimationReviewSpec struct {
	// the pod desired for scheduling
	Templates       []corev1.Pod    `json:"templates"`
	PodRequirements []*Requirements `json:"podRequirements"`
}

type CapacityEstimationReviewStatus

type CapacityEstimationReviewStatus struct {
	CreationTimestamp time.Time `json:"creationTimestamp"`
	// actual number of replicas that could schedule
	Replicas   int32                                       `json:"replicas"`
	StopReason *CapacityEstimationReviewScheduleStopReason `json:"stopReason"`
	// per node information about the scheduling simulation
	Pods []*CapacityEstimationReviewResult `json:"pods"`
}

type CapacityEstimationReviews

type CapacityEstimationReviews []*CapacityEstimationReview

func (CapacityEstimationReviews) Print

func (r CapacityEstimationReviews) Print(verbose bool, format string) error

type PodGenerator

type PodGenerator interface {
	Generate() *corev1.Pod
}

func NewSinglePodGenerator

func NewSinglePodGenerator(podTemplate *corev1.Pod) PodGenerator

type ReplicasOnNode

type ReplicasOnNode struct {
	NodeName string `json:"nodeName"`
	Replicas int    `json:"replicas"`
}

type Requirements

type Requirements struct {
	PodName       string              `json:"podName"`
	Resources     *framework.Resource `json:"resources"`
	NodeSelectors map[string]string   `json:"nodeSelectors"`
}

type Resources

type Resources struct {
	PrimaryResources corev1.ResourceList           `json:"primaryResources"`
	ScalarResources  map[corev1.ResourceName]int64 `json:"scalarResources"`
}

type StopReasonSummary

type StopReasonSummary struct {
	Reason string `json:"reason"`
	Count  int    `json:"count"`
}

Jump to

Keyboard shortcuts

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