cmd

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterCol          = "Cluster"
	NamespaceCol        = "Namespace"
	CPUCol              = "CPU"
	CPUEfficiencyCol    = "CPU Eff."
	MemoryCol           = "Memory"
	MemoryEfficiencyCol = "Memory Eff."
	GPUCol              = "GPU"
	PVCol               = "PV"
	NetworkCol          = "Network"
	SharedCol           = "Shared Cost"
	LoadBalancerCol     = "Load Balancer Cost"
	NameCol             = "Name"
	AssetTypeCol        = "Asset Type"
	CPUCostCol          = "CPU Cost"
	RAMCostCol          = "RAM Cost"

	PredictColWorkload     = "Workload"
	PredictColReqCPU       = "CPU"
	PredictColReqMemory    = "Mem"
	PredictColReqGPU       = "GPU"
	PredictColMoCoreHours  = "Mo. core-hrs"
	PredictColMoGibHours   = "Mo. GiB-hrs"
	PredictColMoGPUHours   = "Mo. GPU-hrs"
	PredictColCostCoreHr   = "Cost/core-hr"
	PredictColCostGiBHr    = "Cost/GiB-hr"
	PredictColCostGPUHr    = "Cost/GPU-hr"
	PredictColMoCostCPU    = "CPU/mo"
	PredictColMoCostMemory = "Mem/mo"
	PredictColMoCostGPU    = "GPU/mo"
	PredictColMoCostTotal  = "Total/mo"
)

Variables

This section is empty.

Functions

func NewCmdCost

func NewCmdCost(
	streams genericclioptions.IOStreams,
	GitCommit string,
	GitBranch string,
	GitState string,
	GitSummary string,
	BuildDate string,
) *cobra.Command

NewCmdCost provides a cobra command that acts as a parent command for all subcommands. It provides only basic usage information. See common.go and the subcommands for the actual functionality.

Types

type CostOptions

type CostOptions struct {
	query.QueryBackendOptions
	// contains filtered or unexported fields
}

CostOptions holds common options for querying and displaying data from the kubecost API

func (*CostOptions) Complete

func (co *CostOptions) Complete(restConfig *rest.Config) error

func (*CostOptions) Validate

func (co *CostOptions) Validate() error

type CostOptionsLabel

type CostOptionsLabel struct {
	CostOptions
	// contains filtered or unexported fields
}

CostOptionsLabel contains the standard CostOptions and any options specific to label queries.

type CostOptionsNode added in v0.2.4

type CostOptionsNode struct {
	CostOptions
}

CostOptionsNode contains the standard CostOptions and any options specific to node queries.

type CostOptionsTUI added in v0.2.7

type CostOptionsTUI struct {
	query.QueryBackendOptions
	// contains filtered or unexported fields
}

type KubeOptions

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

KubeOptions provides information required to communicate with the Kubernetes API

func NewKubeOptions

func NewKubeOptions(streams genericclioptions.IOStreams) *KubeOptions

NewCommonCostOptions creates the default set of cost options

func (*KubeOptions) Complete

func (o *KubeOptions) Complete(cmd *cobra.Command, args []string) error

Complete sets all information required for getting cost information

func (*KubeOptions) Validate

func (o *KubeOptions) Validate() error

Validate ensures that all required arguments and flag values are provided

type PredictOptions added in v0.3.0

type PredictOptions struct {
	query.QueryBackendOptions
	// contains filtered or unexported fields
}

PredictOptions contains options specific to prediction queries.

func (*PredictOptions) Complete added in v0.3.0

func (predictO *PredictOptions) Complete(restConfig *rest.Config) error

func (*PredictOptions) Validate added in v0.3.0

func (predictO *PredictOptions) Validate() error

Jump to

Keyboard shortcuts

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