images

package
Version: v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2019 License: Apache-2.0 Imports: 18 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdMigrateImageReferences

func NewCmdMigrateImageReferences(name, fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdMigrateImageReferences implements a MigrateImages command

Types

type ImageReferenceMapping

type ImageReferenceMapping struct {
	FromRegistry string
	FromName     string
	ToRegistry   string
	ToName       string
}

ImageReferenceMapping represents a transformation of an image reference.

func ParseMapping

func ParseMapping(s string) (ImageReferenceMapping, error)

ParseMapping converts a string in the form "(REGISTRY|*)/(NAME|*)" to an ImageReferenceMapping or returns a user-facing error. REGISTRY is the image registry value (hostname) or "docker.io". NAME is the full repository name (the path relative to the registry root). TODO: handle v2 repository names, which can have multiple segments (must fix

ParseDockerImageReference)

type ImageReferenceMappings

type ImageReferenceMappings []ImageReferenceMapping

ImageReferenceMappings provide a convenience method for transforming an input reference

func (ImageReferenceMappings) MapDockerAuthKey

func (m ImageReferenceMappings) MapDockerAuthKey(in string) string

MapDockerAuthKey transforms the provided Docker Config host key if any mapping matches the input. If the reference cannot be parsed, it will not be modified.

func (ImageReferenceMappings) MapReference

func (m ImageReferenceMappings) MapReference(in string) string

MapReference transforms the provided Docker image reference if any mapping matches the input. If the reference cannot be parsed, it will not be modified.

type MigrateImageReferenceOptions

type MigrateImageReferenceOptions struct {
	migrate.ResourceOptions

	Client          imagev1typedclient.ImageStreamsGetter
	Mappings        ImageReferenceMappings
	UpdatePodSpecFn polymorphichelpers.UpdatePodSpecForObjectFunc
}

func NewMigrateImageReferenceOptions

func NewMigrateImageReferenceOptions(streams genericclioptions.IOStreams) *MigrateImageReferenceOptions

func (*MigrateImageReferenceOptions) Complete

func (MigrateImageReferenceOptions) Run

func (MigrateImageReferenceOptions) Validate

func (o MigrateImageReferenceOptions) Validate() error

type TransformImageFunc

type TransformImageFunc func(in string) string

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL