cmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetObjectKey

func GetObjectKey(recType, kind, apiVersion, namespace, name string) string

func GetObjectRefKey

func GetObjectRefKey(recType string, objectRef corev1.ObjectReference) string

func GetOwnerKey

func GetOwnerKey(recType string, ownRef metav1.OwnerReference, namespace string) string

func GetProposedRecommendationsByMeta

func GetProposedRecommendationsByMeta(kind, apiVersion, namespace, name string, recommendMap map[string]analysisv1alph1.Recommendation) *analysisv1alph1.ProposedRecommendation

func NewCmdCranePod added in v0.1.0

func NewCmdCranePod() *cobra.Command

func NewCmdCraneWorkload added in v0.1.0

func NewCmdCraneWorkload() *cobra.Command

func NewCmdRecommend added in v0.1.0

func NewCmdRecommend() *cobra.Command

func NewCmdRecommendationRule added in v0.1.0

func NewCmdRecommendationRule() *cobra.Command

func NewCmdVersion added in v0.1.0

func NewCmdVersion() *cobra.Command

func NewCmdViewRecommend added in v0.1.0

func NewCmdViewRecommend() *cobra.Command

func NewCraneCommand added in v0.1.0

func NewCraneCommand() *cobra.Command

NewCraneCommand creates the `kubectl-crane` command

func PrintQuantity

func PrintQuantity(quantity *resource.Quantity) string

func PrintReplicas

func PrintReplicas(replicas int32) string

Types

type CranePodOptions added in v0.1.0

type CranePodOptions struct {
	CommonOptions *options.CommonOptions
	AllNamespaces bool
}

func NewCranePodOptions added in v0.1.0

func NewCranePodOptions() *CranePodOptions

func (*CranePodOptions) Complete added in v0.1.0

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

func (*CranePodOptions) Run added in v0.1.0

func (o *CranePodOptions) Run() error

func (*CranePodOptions) Validate added in v0.1.0

func (o *CranePodOptions) Validate() error

type CraneWorkloadOptions added in v0.1.0

type CraneWorkloadOptions struct {
	CommonOptions *options.CommonOptions
	AllNamespaces bool
}

func NewCraneWorkloadOptions added in v0.1.0

func NewCraneWorkloadOptions() *CraneWorkloadOptions

func (*CraneWorkloadOptions) Complete added in v0.1.0

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

func (*CraneWorkloadOptions) Run added in v0.1.0

func (o *CraneWorkloadOptions) Run() error

func (*CraneWorkloadOptions) Validate added in v0.1.0

func (o *CraneWorkloadOptions) Validate() error

type RecommendOptions added in v0.1.0

type RecommendOptions struct {
	CommonOptions *options.CommonOptions
}

func NewRecommendOptions added in v0.1.0

func NewRecommendOptions() *RecommendOptions

type RecommendationRuleOptions added in v0.1.0

type RecommendationRuleOptions struct {
	CommonOptions *options.CommonOptions
}

func NewRecommendationRuleOptions added in v0.1.0

func NewRecommendationRuleOptions() *RecommendationRuleOptions

type ViewRecommendOptions added in v0.1.0

type ViewRecommendOptions struct {
	CommonOptions *options.CommonOptions

	APIVersion string
	Kind       string

	ResourceSelector corev1.ObjectReference
}

func NewViewRecommendOptions added in v0.1.0

func NewViewRecommendOptions() *ViewRecommendOptions

func (*ViewRecommendOptions) AddFlags added in v0.1.0

func (o *ViewRecommendOptions) AddFlags(cmd *cobra.Command)

func (*ViewRecommendOptions) Complete added in v0.1.0

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

func (*ViewRecommendOptions) Run added in v0.1.0

func (o *ViewRecommendOptions) Run() error

func (*ViewRecommendOptions) Validate added in v0.1.0

func (o *ViewRecommendOptions) Validate(args []string) error

type WorkloadMeta

type WorkloadMeta struct {
	ApiVersion string
	Kind       string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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