controller

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImportable = errors.New("the specified stream cannot be imported")

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, notifier Notifier) 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 and conditions are set on the status tags. The tags of the original spec image are left as is (those are updated through status).

There are 3 scenarios:

  1. spec.DockerImageRepository defined without any tags results in all tags being imported from upstream image repository
  1. 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, 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 each definition.

Notifier, if passed, will be invoked if the stream is going to be imported.

func (*ImportController) NextTimed added in v1.1.2

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

func (*ImportController) NextTimedByName added in v1.1.2

func (c *ImportController) NextTimedByName(namespace, name string) error

type ImportControllerFactory

type ImportControllerFactory struct {
	Client               client.Interface
	ResyncInterval       time.Duration
	MinimumCheckInterval time.Duration
	ImportRateLimiter    flowcontrol.RateLimiter
	ScheduleEnabled      bool
}

ImportControllerFactory can create an ImportController.

func (*ImportControllerFactory) Create

Create creates an ImportController.

type Notifier added in v1.1.2

type Notifier interface {
	// Importing is invoked when the controller is going to import an image stream
	Importing(stream *api.ImageStream)
}

Notifier provides information about when the controller makes a decision

type NotifierFunc added in v1.1.2

type NotifierFunc func(stream *api.ImageStream)

NotifierFunc implements Notifier

func (NotifierFunc) Importing added in v1.1.2

func (fn NotifierFunc) Importing(stream *api.ImageStream)

Importing adapts NotifierFunc to Notifier

Jump to

Keyboard shortcuts

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