podutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculatePodRequests

func CalculatePodRequests(pods []*v1.Pod, resource v1.ResourceName) (map[string]int64, error)

CalculatePodRequests calculates pod resource requests for a slice of pods

func GroupPods

func GroupPods(pods []*v1.Pod, metrics metricsclient.PodMetricsInfo, resource v1.ResourceName, cpuInitializationPeriod, delayOfInitialReadinessStatus time.Duration) (readyPodCount int, ignoredPods sets.String, missingPods sets.String)

GroupPods groups pods into ready, missing and ignored based on PodMetricsInfo and resource provided

func RemoveMetricsForPods

func RemoveMetricsForPods(metrics metricsclient.PodMetricsInfo, pods sets.String)

RemoveMetricsForPods removes the pods provided from the PodMetricsInfo provided

Types

type PodReadyCount

type PodReadyCount struct {
	PodLister corelisters.PodLister
}

PodReadyCount provides a way to count the number of ready pods using a pod lister

func (*PodReadyCount) GetReadyPodsCount

func (c *PodReadyCount) GetReadyPodsCount(namespace string, selector labels.Selector) (int64, error)

GetReadyPodsCount returns the number of pods that are deemed 'ready'

type PodReadyCounter

type PodReadyCounter interface {
	GetReadyPodsCount(namespace string, selector labels.Selector) (int64, error)
}

PodReadyCounter provides a way to count number of ready pods

Jump to

Keyboard shortcuts

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