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) Run ¶
func (o MigrateImageReferenceOptions) Run() error
func (MigrateImageReferenceOptions) Validate ¶
func (o MigrateImageReferenceOptions) Validate() error