release

package
v4.0.0-0.9.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2018 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentReferencesForImageStream

func ComponentReferencesForImageStream(is *imageapi.ImageStream) (func(string) imagereference.DockerImageReference, error)

func NewCmd

func NewCmd(f kcmdutil.Factory, parentName string, streams genericclioptions.IOStreams) *cobra.Command

func NewExtract

func NewExtract(f kcmdutil.Factory, parentName string, streams genericclioptions.IOStreams) *cobra.Command

func NewMirror

func NewMirror(f kcmdutil.Factory, parentName string, streams genericclioptions.IOStreams) *cobra.Command

NewMirror creates a command to mirror an existing release.

Example command to mirror a release to a local repository to work offline

$ oc adm release mirror \
    --from=registry.svc.ci.openshift.org/openshift/v4.0 \
    --to=mycompany.com/myrepository/repo

Example command to mirror and promote a release (tooling focused)

$ oc adm release mirror \
    --from=registry.svc.ci.openshift.org/openshift/v4.0-20180926095350 \
    '--to=quay.io/openshift-test-dev/origin-v4.0:v4.1.2-${component}' \
    --to-release-image=quay.io/openshift-test-dev/origin-release:v4.1.2 \
    --to-image-base=registry.svc.ci.openshift.org/openshift/v4.0-20180926095350:cluster-version-operator \
    --rewrite

func NewRelease

func NewRelease(f kcmdutil.Factory, parentName string, streams genericclioptions.IOStreams) *cobra.Command

func NopManifestMapper

func NopManifestMapper(data []byte) ([]byte, error)

Types

type ExtractOptions

type ExtractOptions struct {
	genericclioptions.IOStreams

	From string

	Directory string
	File      string

	ImageMetadataCallback func(m *extract.Mapping, dgst digest.Digest, config *docker10.DockerImageConfig)
}

func NewExtractOptions

func NewExtractOptions(streams genericclioptions.IOStreams) *ExtractOptions

func (*ExtractOptions) Complete

func (o *ExtractOptions) Complete(cmd *cobra.Command, args []string) error

func (*ExtractOptions) Run

func (o *ExtractOptions) Run() error

type ImageReference

type ImageReference struct {
	SourceRepository string
	TargetPullSpec   string
}

type ManifestMapper

type ManifestMapper func(data []byte) ([]byte, error)

func NewExactMapper

func NewExactMapper(mappings map[string]string) (ManifestMapper, error)

func NewImageMapper

func NewImageMapper(images map[string]ImageReference) (ManifestMapper, error)

func NewImageMapperFromImageStreamFile

func NewImageMapperFromImageStreamFile(path string, input *imageapi.ImageStream, allowMissingImages bool) (ManifestMapper, error)

type Mapping

type Mapping struct {
	Source      string
	Destination string
}

type MirrorOptions

type MirrorOptions struct {
	genericclioptions.IOStreams

	From string

	To          string
	ToRelease   string
	SkipRelease bool

	DryRun bool

	ImageStream *imageapi.ImageStream
	TargetFn    func(component string) imagereference.DockerImageReference
}

func NewMirrorOptions

func NewMirrorOptions(streams genericclioptions.IOStreams) *MirrorOptions

NewMirrorOptions creates the options for mirroring a release.

func (*MirrorOptions) Complete

func (o *MirrorOptions) Complete(cmd *cobra.Command, args []string) error

func (*MirrorOptions) Run

func (o *MirrorOptions) Run() error

type NewOptions

type NewOptions struct {
	genericclioptions.IOStreams

	FromDirectory string
	Directory     string
	Filenames     []string
	Output        string
	Name          string

	FromReleaseImage string

	FromImageStream string
	Namespace       string

	DryRun bool

	ToFile      string
	ToDir       string
	ToImage     string
	ToImageBase string

	Mirror string

	MaxPerRegistry int

	AllowMissingImages bool

	Mappings []Mapping

	ImageClient imageclient.Interface
}

func NewNewOptions

func NewNewOptions(streams genericclioptions.IOStreams) *NewOptions

func (*NewOptions) Complete

func (o *NewOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error

func (*NewOptions) Run

func (o *NewOptions) Run() error

type Payload

type Payload struct {
	// contains filtered or unexported fields
}

func NewPayload

func NewPayload(path string) *Payload

func (*Payload) Path

func (p *Payload) Path() string

func (*Payload) References

func (p *Payload) References() (*imageapi.ImageStream, error)

func (*Payload) Rewrite

func (p *Payload) Rewrite(fn func(component string) imagereference.DockerImageReference) error

Rewrite updates the image stream to point to the locations described by the provided function. If a new ID appears in the returned reference, it will be used instead of the existing digest. All references in manifest files will be updated and then the image stream will be written to the correct location with any updated metadata.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL