Documentation
¶
Index ¶
- Constants
- func Advise(ctx context.Context, cfg *scout.Config, pod v1.Pod) error
- func CheckUsage(usage float64, resourceType string, container string) scout.Advice
- func K8s(ctx context.Context, k8sClient *kubernetes.Clientset, ...) error
- func OutputToFile(ctx context.Context, cfg *scout.Config, name string, advice []scout.Advice) error
- type Option
Constants ¶
View Source
const ( UNDER_PROVISIONED = "%s %s: %s is under-provisioned (%.2f%% usage). Add resources." WELL_PROVISIONED = "%s %s: %s is well-provisioned (%.2f%% usage). No action needed." OVER_PROVISIONED = "%s %s: %s is over-provisioned (%.2f%% usage). Trim resources." )
Variables ¶
This section is empty.
Functions ¶
func Advise ¶
Advise generates resource allocation advice for a Kubernetes pod. The function fetches usage metrics for each container in the pod. It then checks the usage percentages against thresholds to determine if more or less of a resource is needed. Advice is generated and either printed to the console or output to a file depending on the cfg.Output field.
func CheckUsage ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.