cmd

package
v0.0.0-...-fb30e7e Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KubernetesConfigFlags *genericclioptions.ConfigFlags
)

Functions

func GlanceK8s

func GlanceK8s(k8sClient *kubernetes.Clientset, gc *GlanceConfig) (err error)

GlanceK8s displays cluster information for a given clientset nolint gocyclo

func NewGlanceCmd

func NewGlanceCmd() *cobra.Command

NewGlanceCmd provides a cobra command

Types

type Glance

type Glance struct {
	Nodes  NodeMap
	Totals Totals
}

Glance is an object that holds nodemaps and totals

type GlanceConfig

type GlanceConfig struct {
	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

GlanceOptions contains options and configurations needed by glance

func NewGlanceConfig

func NewGlanceConfig() (gc *GlanceConfig, err error)

NewGlanceConfig provides an instance of GlanceConfig with default values

type NodeMap

type NodeMap map[string]*NodeStats

type NodeStats

type NodeStats struct {
	Status                  string              `json:",omitempty"`
	ProviderID              string              `json:",omitempty"`
	NodeInfo                v1.NodeSystemInfo   `json:",omitempty"`
	CloudInfo               cloudInfo           `json:",omitempty"`
	AllocatableCPU          *resource.Quantity  `json:",omitempty"`
	AllocatableMemory       *resource.Quantity  `json:",omitempty"`
	CapacityCPU             *resource.Quantity  `json:",omitempty"`
	CapacityMemory          *resource.Quantity  `json:",omitempty"`
	AllocatedCPUrequests    resource.Quantity   `json:",omitempty"`
	AllocatedCPULimits      resource.Quantity   `json:",omitempty"`
	AllocatedMemoryRequests resource.Quantity   `json:",omitempty"`
	AllocatedMemoryLimits   resource.Quantity   `json:",omitempty"`
	UsageCPU                *resource.Quantity  `json:",omitempty"`
	UsageMemory             *resource.Quantity  `json:",omitempty"`
	PodInfo                 map[string]*PodInfo `json:",omitempty"`
}

nolint unused NodeStats is an object to hold relevent node stats

type PodInfo

type PodInfo struct {
	Qos         *v1.PodQOSClass    `json:",omitempty"`
	PodReqs     *v1.ResourceList   `json:",omitempty"`
	PodLimits   *v1.ResourceList   `json:",omitempty"`
	UsageCPU    *resource.Quantity `json:",omitempty"`
	UsageMemory *resource.Quantity `json:",omitempty"`
}

type Totals

type Totals struct {
	TotalAllocatableCPU          *resource.Quantity `json:",omitempty"`
	TotalAllocatableMemory       *resource.Quantity `json:",omitempty"`
	TotalCapacityCPU             *resource.Quantity `json:",omitempty"`
	TotalCapacityMemory          *resource.Quantity `json:",omitempty"`
	TotalAllocatedCPUrequests    *resource.Quantity `json:",omitempty"`
	TotalAllocatedCPULimits      *resource.Quantity `json:",omitempty"`
	TotalAllocatedMemoryRequests *resource.Quantity `json:",omitempty"`
	TotalAllocatedMemoryLimits   *resource.Quantity `json:",omitempty"`
	TotalUsageCPU                *resource.Quantity `json:",omitempty"`
	TotalUsageMemory             *resource.Quantity `json:",omitempty"`
}

nolint unused Totals is an object to hold totals

Jump to

Keyboard shortcuts

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