kubecli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllResourceUsages

func GetAllResourceUsages(metrics *metricsutil.ResourceMetricsInfo) map[v1.ResourceName]int64

func GetPodMetrics

func GetPodMetrics(m *metricsapi.PodMetrics) v1.ResourceList

func GetSingleResourceUsage

func GetSingleResourceUsage(resourceType v1.ResourceName, quantity resource.Quantity) int64

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

func NewCmd added in v0.1.2

func NewCmd(cmd *cobra.Command, args []string, streams genericclioptions.IOStreams) *Cmd

func (*Cmd) Run

func (c *Cmd) Run()

func (*Cmd) SetFlag

func (c *Cmd) SetFlag(name, value string) *Cmd

type KubeCLI

type KubeCLI struct {
	// contains filtered or unexported fields
}
var Cli *KubeCLI

func NewKubeCLI

func NewKubeCLI() *KubeCLI

func (*KubeCLI) ClusterInfo

func (cli *KubeCLI) ClusterInfo() (string, error)

func (*KubeCLI) CurrentContext

func (cli *KubeCLI) CurrentContext() (string, error)

func (*KubeCLI) Describe

func (cli *KubeCLI) Describe(streams genericclioptions.IOStreams, args ...string) *Cmd

func (*KubeCLI) Get

func (cli *KubeCLI) Get(streams genericclioptions.IOStreams, args ...string) *Cmd

func (*KubeCLI) GetPodMetrics

func (cli *KubeCLI) GetPodMetrics(namespace, name string, allNamespaces bool, selector labels.Selector) ([]map[v1.ResourceName]int64, error)

func (*KubeCLI) GetPodRawMetrics

func (cli *KubeCLI) GetPodRawMetrics(namespace, name string, allNamespaces bool, selector labels.Selector) (*metricsapi.PodMetricsList, error)

func (*KubeCLI) Logs

func (cli *KubeCLI) Logs(streams genericclioptions.IOStreams, args ...string) *Cmd

func (*KubeCLI) Namespace

func (cli *KubeCLI) Namespace() string

func (*KubeCLI) SetNamespace

func (cli *KubeCLI) SetNamespace(namespace string)

func (*KubeCLI) TopNode

func (cli *KubeCLI) TopNode(streams genericclioptions.IOStreams, o *top.TopNodeOptions, args ...string) *Cmd

func (*KubeCLI) TopPod

func (cli *KubeCLI) TopPod(streams genericclioptions.IOStreams, o *top.TopPodOptions, args ...string) *Cmd

func (*KubeCLI) WithNamespace

func (cli *KubeCLI) WithNamespace(namespace string) *KubeCLI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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