podanalyzer

package
v1.9.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2017 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// TODO: make it configurable
	UnschedulableThreshold = 60 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PodAnalysisResult

type PodAnalysisResult struct {
	// Total number of pods created.
	Total int
	// Number of pods that are running and ready.
	RunningAndReady int
	// Number of pods that have been in unschedulable state for UnshedulableThreshold seconds.
	Unschedulable int
}

func AnalyzePods

func AnalyzePods(pods *api_v1.PodList, currentTime time.Time) PodAnalysisResult

AnalyzePods calculates how many pods from the list are in one of the meaningful (from the replica set perspective) states. This function is a temporary workaround against the current lack of ownerRef in pods.

Jump to

Keyboard shortcuts

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