Documentation
¶
Index ¶
- Constants
- func ClusterCapacityReviewPrint(r *ClusterCapacityReview, verbose bool, format string) error
- type ClusterCapacity
- func (c *ClusterCapacity) Close()
- func (c *ClusterCapacity) Report() *ClusterCapacityReview
- func (c *ClusterCapacity) Run() error
- func (c *ClusterCapacity) ScheduledPods() []*v1.Pod
- func (c *ClusterCapacity) SyncWithClient(client externalclientset.Interface) error
- func (c *ClusterCapacity) Update(pod *v1.Pod, podCondition *v1.PodCondition, schedulerName string) error
- type ClusterCapacityReview
- type ClusterCapacityReviewResult
- type ClusterCapacityReviewScheduleFailReason
- type ClusterCapacityReviewSpec
- type ClusterCapacityReviewStatus
- type FailReasonSummary
- type PodGenerator
- type ReplicasOnNode
- type Requirements
- type Resources
- type Status
Constants ¶
View Source
const (
ResourceNvidiaGPU v1.ResourceName = "nvdia.com/gpu"
)
Variables ¶
This section is empty.
Functions ¶
func ClusterCapacityReviewPrint ¶
func ClusterCapacityReviewPrint(r *ClusterCapacityReview, verbose bool, format string) error
Types ¶
type ClusterCapacity ¶
type ClusterCapacity struct {
// contains filtered or unexported fields
}
func New ¶
func New(kubeSchedulerConfig *schedconfig.CompletedConfig, kubeConfig *restclient.Config, simulatedPod *v1.Pod, maxPods int, excludeNodes []string) (*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) Close ¶
func (c *ClusterCapacity) Close()
func (*ClusterCapacity) Report ¶
func (c *ClusterCapacity) Report() *ClusterCapacityReview
func (*ClusterCapacity) Run ¶
func (c *ClusterCapacity) Run() error
func (*ClusterCapacity) ScheduledPods ¶ added in v0.23.0
func (c *ClusterCapacity) ScheduledPods() []*v1.Pod
func (*ClusterCapacity) SyncWithClient ¶
func (c *ClusterCapacity) SyncWithClient(client externalclientset.Interface) error
func (*ClusterCapacity) Update ¶
func (c *ClusterCapacity) Update(pod *v1.Pod, podCondition *v1.PodCondition, schedulerName string) error
type ClusterCapacityReview ¶
type ClusterCapacityReview struct { metav1.TypeMeta Spec ClusterCapacityReviewSpec `json:"spec"` Status ClusterCapacityReviewStatus `json:"status"` }
type ClusterCapacityReviewResult ¶
type ClusterCapacityReviewResult 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) FailSummary []FailReasonSummary `json:"failSummary"` }
type ClusterCapacityReviewSpec ¶
type ClusterCapacityReviewSpec struct { // the pod desired for scheduling Templates []v1.Pod `json:"templates"` // desired number of replicas that should be scheduled // +optional Replicas int32 `json:"replicas"` PodRequirements []*Requirements `json:"podRequirements"` }
type ClusterCapacityReviewStatus ¶
type ClusterCapacityReviewStatus struct { CreationTimestamp time.Time `json:"creationTimestamp"` // actual number of replicas that could schedule Replicas int32 `json:"replicas"` FailReason *ClusterCapacityReviewScheduleFailReason `json:"failReason"` // per node information about the scheduling simulation Pods []*ClusterCapacityReviewResult `json:"pods"` }
type FailReasonSummary ¶
type PodGenerator ¶ added in v0.23.0
func NewSinglePodGenerator ¶ added in v0.23.0
func NewSinglePodGenerator(podTemplate *v1.Pod) PodGenerator
type ReplicasOnNode ¶
type Requirements ¶
type Resources ¶
type Resources struct { PrimaryResources v1.ResourceList `json:"primaryResources"` ScalarResources map[v1.ResourceName]int64 `json:"scalarResources"` }
Click to show internal directories.
Click to hide internal directories.