Documentation
¶
Overview ¶
Package agent introduces the agent which would communicate with node's container runtime, and the client for it.
Index ¶
Constants ¶
View Source
const URLHealth = "/healthz"
URLHealth is the HTTP endpoint for health check.
View Source
const URLImageLoad = "/image/load"
URLImageLoad is the default HTTP endpoint for loading the container image. TODO: move HTTP server from cmd/kubectl-image-agent to here.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application is the core component for command kubectl-image-agent.
func NewApplication ¶
func NewApplication(listenAddress string, remote containerruntime.Remote, logger logr.Logger) *Application
NewApplication is the constructor for Application.
type Client ¶
type Client interface {
// Health execute the health check for target kubectl-image-agent.
Health(ctx context.Context) (bool, error)
// LoadImage loads the image into the nodes which running kubectl-image-agent.
LoadImage(ctx context.Context, imageContent io.Reader) error
// ListImage return all the existed container images
ListImage(ctx context.Context) ([]ContainerImage, error)
}
Client is the interface to interact with each kubectl-image-agent.
type ContainerImage ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient is the default implementation of the Client interface.
func NewHTTPClient ¶
func NewHTTPClient(address string, logger logr.Logger) *HTTPClient
NewHTTPClient is the constructor for the HTTPClient.
Directories
¶
| Path | Synopsis |
|---|---|
|
container
|
|
|
runtime
Package runtime provides basic interfaces to interact with the different container runtimes.
|
Package runtime provides basic interfaces to interact with the different container runtimes. |
|
Package provisioner provides the tools to setup the `kubectl-image-agent` on the target kubernetes cluster.
|
Package provisioner provides the tools to setup the `kubectl-image-agent` on the target kubernetes cluster. |
Click to show internal directories.
Click to hide internal directories.