Documentation ¶
Index ¶
- func GetObjectKey(recType, kind, apiVersion, namespace, name string) string
- func GetObjectRefKey(recType string, objectRef corev1.ObjectReference) string
- func GetOwnerKey(recType string, ownRef metav1.OwnerReference, namespace string) string
- func GetProposedRecommendationsByMeta(kind, apiVersion, namespace, name string, ...) *analysisv1alph1.ProposedRecommendation
- func GetResourceRequestRecommendationsByPod(pod corev1.Pod, recommendMap map[string]analysisv1alph1.Recommendation) *analysisv1alph1.ResourceRequestRecommendation
- func NewCmdCranePod() *cobra.Command
- func NewCmdCraneWorkload() *cobra.Command
- func NewCmdRecommend() *cobra.Command
- func NewCmdRecommendationRule() *cobra.Command
- func NewCmdVersion() *cobra.Command
- func NewCmdViewRecommend() *cobra.Command
- func NewCraneCommand() *cobra.Command
- func PrintQuantity(quantity *resource.Quantity) string
- func PrintReplicas(replicas int32) string
- type CranePodOptions
- type CraneWorkloadOptions
- type RecommendOptions
- type RecommendationRuleOptions
- type ViewRecommendOptions
- type WorkloadMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetObjectKey ¶
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 GetResourceRequestRecommendationsByPod ¶
func GetResourceRequestRecommendationsByPod(pod corev1.Pod, recommendMap map[string]analysisv1alph1.Recommendation) *analysisv1alph1.ResourceRequestRecommendation
func NewCmdCranePod ¶ added in v0.1.0
func NewCmdCraneWorkload ¶ added in v0.1.0
func NewCmdRecommend ¶ added in v0.1.0
func NewCmdRecommendationRule ¶ added in v0.1.0
func NewCmdVersion ¶ added in v0.1.0
func NewCmdViewRecommend ¶ added in v0.1.0
func NewCraneCommand ¶ added in v0.1.0
NewCraneCommand creates the `kubectl-crane` command
func PrintQuantity ¶
func PrintReplicas ¶
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 ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.