Documentation
¶
Index ¶
- func EstimateContainerCPUUsage(ci *types.ContainerInfo, metaReader metacache.MetaReader, reclaimEnable bool) (float64, error)
- func EstimateContainerMemoryUsage(ci *types.ContainerInfo, metaReader metacache.MetaReader, reclaimEnable bool) (float64, error)
- func PodEnableReclaim(ctx context.Context, metaServer *metaserver.MetaServer, podUID string, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateContainerCPUUsage ¶
func EstimateContainerCPUUsage(ci *types.ContainerInfo, metaReader metacache.MetaReader, reclaimEnable bool) (float64, error)
EstimateContainerCPUUsage used to estimate non-reclaimed pods CPU usage. If reclaimEnable is true, it will estimate reclaimed pods CPU usage.
func EstimateContainerMemoryUsage ¶
func EstimateContainerMemoryUsage(ci *types.ContainerInfo, metaReader metacache.MetaReader, reclaimEnable bool) (float64, error)
EstimateContainerMemoryUsage used to estimate non-reclaimed pods memory usage. If reclaim disabled or metrics missed, memory usage will be regarded as Pod memory requests.
func PodEnableReclaim ¶
func PodEnableReclaim(ctx context.Context, metaServer *metaserver.MetaServer, podUID string, nodeEnableReclaim bool) (bool, error)
PodEnableReclaim checks whether the pod can be reclaimed, if node does not enable reclaim, it will return false directly, if node enable reclaim, it will check whether the pod is degraded.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.