Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParsingImage = fmt.Errorf("unable to parse image reference into a valid bootc target")
Functions ¶
func ImageToBootcTarget ¶ added in v0.4.0
Bootc does not accept images with tags AND digests specified - in the case when we get both we will use the image digest.
Related underlying issue: https://github.com/containers/image/issues/1736
func IsOsImageReconciled ¶
func IsOsImageReconciled(host *BootcHost, desiredSpec *v1alpha1.RenderedDeviceSpec) (bool, error)
IsOsImageReconciled returns true if the booted image equals the target for the spec image.
Types ¶
type BootcClient ¶
type BootcClient interface {
// Status returns the current bootc status.
Status(ctx context.Context) (*BootcHost, error)
// Switch targets a new container image reference to boot.
Switch(ctx context.Context, image string) error
// UsrOverlay adds a transient writable overlayfs on `/usr` that will be discarded on reboot.
UsrOverlay(ctx context.Context) error
// Apply restart or reboot into the new target image.
Apply(ctx context.Context) error
}
type BootcHost ¶
type BootcHost struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata Metadata `json:"metadata"`
Spec Spec `json:"spec"`
Status Status `json:"status"`
}
func (*BootcHost) GetBootedImage ¶
func (*BootcHost) GetBootedImageDigest ¶ added in v0.3.0
func (*BootcHost) GetRollbackImage ¶
func (*BootcHost) GetStagedImage ¶
type ImageDetails ¶
type ImageStatus ¶
type ImageStatus struct {
Image ImageDetails `json:"image"`
}
type Status ¶
type Status struct {
Staged ImageStatus `json:"staged"`
Booted ImageStatus `json:"booted"`
Rollback ImageStatus `json:"rollback"`
Type string `json:"type"`
}
Click to show internal directories.
Click to hide internal directories.