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:
- spec.DockerImageRepository defined without any tags results in all tags being imported from upstream image repository
- 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
- 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 ¶
ImportControllerFactory can create an ImportController.
func (*ImportControllerFactory) Create ¶
func (f *ImportControllerFactory) Create() controller.RunnableController
Create creates an ImportController.