cmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResourceNodeLong = templates.LongDesc(i18n.T(`
		Display resource (CPU/Memory/PodCount) usage of nodes.

		The resource-node command allows you to see the resource consumption of nodes.`))

	ResourceNodeExample = templates.Examples(i18n.T(`
		  # Show metrics for all nodes
		  kubectl resource node

		  # Show metrics for a given node
		  kubectl resource node NODE_NAME`))
)
View Source
var (
	// set values via build flags
	ShowOptionFlag bool
)

Functions

func NewCmdResource

func NewCmdResource() *cobra.Command

NewCmdResource

func SupportedMetricsAPIVersionAvailable

func SupportedMetricsAPIVersionAvailable(discoveredAPIGroups *metav1.APIGroupList) bool

SupportedMetricsAPIVersionAvailable

Types

type ResourceNodeOptions

type ResourceNodeOptions struct {
	ResourceName       string
	ResourceType       string
	Selector           string
	SortBy             string
	NoFormat           bool
	UseProtocolBuffers bool

	NodeClient      corev1client.CoreV1Interface
	Printer         *metricsutil.TopCmdPrinter
	DiscoveryClient discovery.DiscoveryInterface
	MetricsClient   metricsclientset.Interface
	Client          *kube.KubeClient

	genericclioptions.IOStreams
}

func (*ResourceNodeOptions) Complete

func (o *ResourceNodeOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

func (ResourceNodeOptions) RunResourceNode

func (o ResourceNodeOptions) RunResourceNode() error

func (*ResourceNodeOptions) Validate

func (o *ResourceNodeOptions) Validate(cmd *cobra.Command, args []string) error

type ResourcePodOptions

type ResourcePodOptions struct {
	ResourceName       string
	Namespace          string
	ResourceType       string
	LabelSelector      string
	FieldSelector      string
	SortBy             string
	NoFormat           bool
	AllNamespaces      bool
	PrintContainers    bool
	NoHeaders          bool
	UseProtocolBuffers bool

	PodClient       corev1client.PodsGetter
	Printer         *metricsutil.TopCmdPrinter
	DiscoveryClient discovery.DiscoveryInterface
	MetricsClient   metricsclientset.Interface
	Client          *kube.KubeClient

	genericclioptions.IOStreams
}

func (*ResourcePodOptions) Complete

func (o *ResourcePodOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

func (ResourcePodOptions) RunResourcePod

func (o ResourcePodOptions) RunResourcePod() error

func (*ResourcePodOptions) Validate

func (o *ResourcePodOptions) Validate() error

Jump to

Keyboard shortcuts

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