images

package
v3.7.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdMigrateImageReferences

func NewCmdMigrateImageReferences(name, fullName string, f *clientcmd.Factory, in io.Reader, out, errout io.Writer) *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          imagetypedclient.ImageStreamsGetter
	Mappings        ImageReferenceMappings
	UpdatePodSpecFn func(obj runtime.Object, fn func(*kapi.PodSpec) error) (bool, error)
}

func (*MigrateImageReferenceOptions) Complete

func (MigrateImageReferenceOptions) Run

func (MigrateImageReferenceOptions) Validate

func (o MigrateImageReferenceOptions) Validate() error

type TransformImageFunc

type TransformImageFunc func(in string) string

Jump to

Keyboard shortcuts

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