Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultImageTag is the default tag for docker image. DefaultImageTag = "latest" // Name is the name of the plugin used in the plugin registry and configurations. Name = "ImageLocality" )
The two thresholds are used as bounds for the image score range. They correspond to a reasonable size range for container images compressed and stored in registries; 90%ile of images on dockerhub drops into this range.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImageLocality ¶
type ImageLocality struct {
// contains filtered or unexported fields
}
ImageLocality is a score plugin that favors nodes that already have requested pod container's images. This plugin now supports nodes having Node. If CNR will support this feature, we can do it later.
func (*ImageLocality) Name ¶
func (pl *ImageLocality) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*ImageLocality) Score ¶
func (pl *ImageLocality) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the score extension point.
func (*ImageLocality) ScoreExtensions ¶
func (pl *ImageLocality) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.
Click to show internal directories.
Click to hide internal directories.