Documentation ¶
Overview ¶
Package mirror contains tools for managing container images for internet-disconnected systems.\.
Index ¶
- Variables
- func GenerateICSPs(imageName string, byteLimit int, icspScope string, ...) (icsps []operatorv1alpha1.ImageContentSourcePolicy, err error)
- func NewMirrorCmd() *cobra.Command
- func WriteCatalogSource(source imagesource.TypedImageReference, dir string, ...) error
- func WriteICSPs(dir string, icsps []operatorv1alpha1.ImageContentSourcePolicy) error
- type AdditionalOptions
- type ErrArchiveFileNotFound
- type HelmOptions
- type MirrorOptions
- func (o *MirrorOptions) BindFlags(fs *pflag.FlagSet)
- func (o *MirrorOptions) Complete(args []string) error
- func (o MirrorOptions) Create(ctx context.Context, flags *pflag.FlagSet) error
- func (o MirrorOptions) Publish(ctx context.Context, cmd *cobra.Command, f kcmdutil.Factory) error
- func (o *MirrorOptions) Run(cmd *cobra.Command, f kcmdutil.Factory) error
- func (o *MirrorOptions) Validate() error
- type OperatorOptions
- type ReleaseOptions
- type SequenceError
- type UuidError
Constants ¶
This section is empty.
Variables ¶
var (
// Pinned to upstream opm v1.18.0 (k8s 1.21).
OPMImage = "quay.io/operator-framework/opm@sha256:038007c1c5d5f0efa50961cbcc097c6e63655a2ab4126547e3c4eb620ad0346e"
)
Functions ¶
func GenerateICSPs ¶
func GenerateICSPs(imageName string, byteLimit int, icspScope string, mapping map[reference.DockerImageReference]reference.DockerImageReference) (icsps []operatorv1alpha1.ImageContentSourcePolicy, err error)
func NewMirrorCmd ¶
func WriteCatalogSource ¶
func WriteCatalogSource(source imagesource.TypedImageReference, dir string, mapping map[imagesource.TypedImageReference]imagesource.TypedImageReference) error
func WriteICSPs ¶
func WriteICSPs(dir string, icsps []operatorv1alpha1.ImageContentSourcePolicy) error
Copied from https://github.com/openshift/oc/blob/5d8dfa1c2e8e7469d69d76f21e0a166a0de8663b/pkg/cli/admin/catalog/mirror.go#L549 Changes made are breaking ICSP and Catalog Source generation into different functions
Types ¶
type AdditionalOptions ¶
type AdditionalOptions struct {
MirrorOptions
}
func NewAdditionalOptions ¶
func NewAdditionalOptions(mo MirrorOptions) *AdditionalOptions
func (*AdditionalOptions) GetAdditional ¶
func (o *AdditionalOptions) GetAdditional(cfg v1alpha1.ImageSetConfiguration, imageList []v1alpha1.AdditionalImages) (image.AssociationSet, error)
GetAdditional downloads specified images in the imageset-config.yaml under mirror.additonalImages
type ErrArchiveFileNotFound ¶
type ErrArchiveFileNotFound struct {
// contains filtered or unexported fields
}
func (*ErrArchiveFileNotFound) Error ¶
func (e *ErrArchiveFileNotFound) Error() string
type HelmOptions ¶
type HelmOptions struct { MirrorOptions // contains filtered or unexported fields }
func NewHelmOptions ¶
func NewHelmOptions(mo MirrorOptions) *HelmOptions
func (*HelmOptions) PullCharts ¶
func (h *HelmOptions) PullCharts(cfg v1alpha1.ImageSetConfiguration) (image.AssociationSet, error)
type MirrorOptions ¶
type MirrorOptions struct { *cli.RootOptions OutputDir string ConfigPath string SkipImagePin bool ManifestsOnly bool From string ToMirror string DryRun bool SourceSkipTLS bool DestSkipTLS bool SkipVerification bool SkipCleanup bool SkipMissing bool ContinueOnError bool FilterOptions imagemanifest.FilterOptions BuildxPlatforms []string }
func (*MirrorOptions) BindFlags ¶
func (o *MirrorOptions) BindFlags(fs *pflag.FlagSet)
func (*MirrorOptions) Complete ¶
func (o *MirrorOptions) Complete(args []string) error
func (*MirrorOptions) Validate ¶
func (o *MirrorOptions) Validate() error
type OperatorOptions ¶
type OperatorOptions struct { MirrorOptions SkipImagePin bool Logger *logrus.Entry // contains filtered or unexported fields }
OperatorOptions configures either a Full or Diff mirror operation on a particular operator catalog image.
func NewOperatorOptions ¶
func NewOperatorOptions(mo MirrorOptions) *OperatorOptions
func (*OperatorOptions) Diff ¶
func (o *OperatorOptions) Diff(ctx context.Context, cfg v1alpha1.ImageSetConfiguration, lastRun v1alpha1.PastMirror) (image.AssociationSet, error)
Diff mirrors only the diff between each old and new catalog image pair to the <Dir>/src directory.
func (*OperatorOptions) Full ¶
func (o *OperatorOptions) Full(ctx context.Context, cfg v1alpha1.ImageSetConfiguration) (image.AssociationSet, error)
Full mirrors each catalog image in its entirety to the <Dir>/src directory.
type ReleaseOptions ¶
type ReleaseOptions struct { MirrorOptions // contains filtered or unexported fields }
ReleaseOptions configures either a Full or Diff mirror operation on a particular release image.
func NewReleaseOptions ¶
func NewReleaseOptions(mo MirrorOptions, flags *pflag.FlagSet) *ReleaseOptions
NewReleaseOptions defaults ReleaseOptions.
func (*ReleaseOptions) GetReleases ¶
func (o *ReleaseOptions) GetReleases(ctx context.Context, meta v1alpha1.Metadata, cfg *v1alpha1.ImageSetConfiguration) (image.AssociationSet, error)
GetReleases will pill release payloads based on user configuration
type SequenceError ¶
type SequenceError struct {
// contains filtered or unexported fields
}
func (*SequenceError) Error ¶
func (s *SequenceError) Error() string