controller

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2015 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportController

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

func (*ImportController) Next

func (c *ImportController) Next(stream *api.ImageStream) error

Next processes the given image stream, looking for streams that have DockerImageRepository set but have not yet been marked as "ready". If transient errors occur, err is returned but the image stream is not modified (so it will be tried again later). If a permanent failure occurs the image is marked with an annotation. The tags of the original spec image are left as is (those are updated through status). There are 3 use cases here:

  1. spec.DockerImageRepository defined without any tags results in all tags being imported from upstream image repository
  2. spec.DockerImageRepository + tags defined - import all tags from upstream image repository, and all the specified which (if name matches) will overwrite the default ones. Additionally: for kind == DockerImage import or reference underlying image, iow. exact tag (not provided means latest), for kind != DockerImage reference tag from the same or other ImageStream
  3. spec.DockerImageRepository not defined - import tags per its definition.

Current behavior of the controller is to process import as far as possible, but we still want to keep backwards compatibility and retries, for that we'll return error in the following cases: 1. connection failure to upstream image repository 2. reading tags when error is different from RepositoryNotFound or RegistryNotFound 3. image retrieving when error is different from RepositoryNotFound, RegistryNotFound or ImageNotFound 4. ImageStreamMapping save error 5. error when marking ImageStream as imported

type ImportControllerFactory

type ImportControllerFactory struct {
	Client client.Interface
}

ImportControllerFactory can create an ImportController.

func (*ImportControllerFactory) Create

Create creates an ImportController.

Jump to

Keyboard shortcuts

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