Documentation ¶
Index ¶
- Variables
- func MapKeyInIntSlice(haystack []string, needle string) bool
- func NewCmdResouceNode(f cmdutil.Factory, o *ResourceNodeOptions, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdResoucePod(f cmdutil.Factory, o *ResourcePodOptions, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdResource() *cobra.Command
- func SupportedMetricsAPIVersionAvailable(discoveredAPIGroups *metav1.APIGroupList) bool
- type ResourceNodeOptions
- type ResourcePodOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ResourceNodeLong = templates.LongDesc(i18n.T(` Display resource (cpu/memory/gpu/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-view node # Show metrics for a given node kubectl resource-view node NODE_NAME # Show metrics for the node defined by type name=cpu,memory,gpu,pod kubectl resource-view node -t cpu,memory,gpu,pod `)) )
Functions ¶
func MapKeyInIntSlice ¶ added in v0.2.0
MapKeyInIntSlice
func NewCmdResouceNode ¶
func NewCmdResouceNode(f cmdutil.Factory, o *ResourceNodeOptions, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdResoucePod ¶
func NewCmdResoucePod(f cmdutil.Factory, o *ResourcePodOptions, streams genericclioptions.IOStreams) *cobra.Command
func SupportedMetricsAPIVersionAvailable ¶
func SupportedMetricsAPIVersionAvailable(discoveredAPIGroups *metav1.APIGroupList) bool
SupportedMetricsAPIVersionAvailable
Types ¶
type ResourceNodeOptions ¶
type ResourceNodeOptions struct { ResourceName string ResourceType string ResourceTypeslice []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) RunResourceNode ¶
func (o ResourceNodeOptions) RunResourceNode() error
type ResourcePodOptions ¶
type ResourcePodOptions struct { ResourceName string Namespace string ResourceType string ResourceTypeslice []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) RunResourcePod ¶
func (o ResourcePodOptions) RunResourcePod() error
func (*ResourcePodOptions) Validate ¶
func (o *ResourcePodOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.