Documentation
¶
Overview ¶
Package imagepull pulls images onto a node through the container runtime's image service (CRI), for the node-agent. Nothing from an image runs: the runtime only fetches and unpacks it, which is all a prepull needs. The pull carries no credentials: the references already name the tenant (<prefix>/c/<tenant>/...), and the registry gate decides by the node and the reference.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRIPuller ¶
type CRIPuller struct {
// contains filtered or unexported fields
}
CRIPuller pulls through the image service of the node's container runtime. Images land in the runtime's own namespace (the kubelet's), so the kubelet finds them.
func NewCRIPuller ¶
NewCRIPuller connects (lazily) to the CRI socket.
type Failure ¶
type Failure struct {
Image, Message string
}
Failure is an image that could not be pulled.
type Options ¶
type Options struct {
// Concurrency is how many images are pulled at once (2).
Concurrency int
// Timeout bounds one image (5m).
Timeout time.Duration
}
Options bound a Pull.
type Puller ¶
type Puller interface {
// Present reports whether the node already holds the image.
Present(ctx context.Context, ref string) (bool, error)
// Pull fetches the image.
Pull(ctx context.Context, ref string) error
}
Puller is the container runtime's image service.
type Result ¶
Result is the outcome for one node: every image is in exactly one of the lists.