api

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2016 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DockerDefaultNamespace is the value for namespace when a single segment name is provided.
	DockerDefaultNamespace = "library"
	// DockerDefaultRegistry is the value for the registry when none was provided.
	DockerDefaultRegistry = "docker.io"
	// DockerDefaultV1Registry is the host name of the default v1 registry
	DockerDefaultV1Registry = "index." + DockerDefaultRegistry
	// DockerDefaultV2Registry is the host name of the default v2 registry
	DockerDefaultV2Registry = "registry-1." + DockerDefaultRegistry
)
View Source
const (
	// ManagedByOpenShiftAnnotation indicates that an image is managed by OpenShift's registry.
	ManagedByOpenShiftAnnotation = "openshift.io/image.managed"

	// DockerImageRepositoryCheckAnnotation indicates that OpenShift has
	// attempted to import tag and image information from an external Docker
	// image repository.
	DockerImageRepositoryCheckAnnotation = "openshift.io/image.dockerRepositoryCheck"

	// InsecureRepositoryAnnotation may be set true on an image stream to allow insecure access to pull content.
	InsecureRepositoryAnnotation = "openshift.io/image.insecureRepository"

	// ExcludeImageSecretAnnotation indicates that a secret should not be returned by imagestream/secrets.
	ExcludeImageSecretAnnotation = "openshift.io/image.excludeSecret"

	// DefaultImageTag is used when an image tag is needed and the configuration does not specify a tag to use.
	DefaultImageTag = "latest"
)

Variables

View Source
var SchemeGroupVersion = unversioned.GroupVersion{Group: "", Version: ""}

SchemeGroupVersion is group version used to register these objects

Functions

func AddTagEventToImageStream added in v0.4.3

func AddTagEventToImageStream(stream *ImageStream, tag string, next TagEvent) bool

AddTagEventToImageStream attempts to update the given image stream with a tag event. It will collapse duplicate entries - returning true if a change was made or false if no change occurred. Any successful tag resets the status field.

func DifferentTagEvent added in v1.1.2

func DifferentTagEvent(stream *ImageStream, tag string, next TagEvent) bool

DifferentTagEvent returns true if the supplied tag event matches the current stream tag event. Generation is not compared.

func HasTagCondition added in v1.1.2

func HasTagCondition(stream *ImageStream, tag string, condition TagEventCondition) bool

HasTagCondition returns true if the specified image stream tag has a condition with the same type, status, and reason (does not check generation, date, or message).

func ImageStreamToSelectableFields added in v1.0.8

func ImageStreamToSelectableFields(ir *ImageStream) fields.Set

ImageStreamToSelectableFields returns a label set that represents the object.

func ImageToSelectableFields added in v1.0.8

func ImageToSelectableFields(image *Image) fields.Set

ImageToSelectableFields returns a label set that represents the object.

func ImageWithMetadata added in v0.4.2

func ImageWithMetadata(image *Image) error

ImageWithMetadata returns a copy of image with the DockerImageMetadata filled in from the raw DockerImageManifest data stored in the image.

func IsRegistryDockerHub added in v1.1.2

func IsRegistryDockerHub(registry string) bool

IsRegistryDockerHub returns true if the given registry name belongs to Docker hub.

func JoinImageStreamTag added in v0.5.1

func JoinImageStreamTag(name, tag string) string

JoinImageStreamTag turns a name and tag into the name of an ImageStreamTag

func Kind added in v1.1.2

func Kind(kind string) unversioned.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func LatestObservedTagGeneration added in v1.1.2

func LatestObservedTagGeneration(stream *ImageStream, tag string) int64

LatestObservedTagGeneration returns the generation value for the given tag that has been observed by the controller monitoring the image stream. If the tag has not been observed, the generation is zero.

func ManifestMatchesImage added in v1.1.2

func ManifestMatchesImage(image *Image, newManifest []byte) (bool, error)

ManifestMatchesImage returns true if the provided manifest matches the name of the image.

func MostAccuratePullSpec added in v1.1.2

func MostAccuratePullSpec(pullSpec string, id, tag string) (string, bool)

MostAccuratePullSpec returns a docker image reference that uses the current ID if possible, the current tag otherwise, and returns false if the reference if the spec could not be parsed. The returned spec has all client defaults applied.

func NormalizeImageStreamTag added in v1.0.8

func NormalizeImageStreamTag(name string) string

NormalizeImageStreamTag normalizes an image stream tag by defaulting to 'latest' if no tag has been specified.

func PrioritizeTags added in v1.1.2

func PrioritizeTags(tags []string)

PrioritizeTags orders a set of image tags with a few conventions:

1. the "latest" tag, if present, should be first 2. any tags that represent a semantic major version ("5", "v5") should be next, in descending order 3. any tags that represent a semantic minor version ("5.1", "v5.1") should be next, in descending order 4. any tags that represent a full semantic version ("5.1.3-other", "v5.1.3-other") should be next, in descending order 5. any remaining tags should be sorted in lexicographic order

The method updates the tags in place.

func Resource added in v1.1.2

func Resource(resource string) unversioned.GroupResource

Resource takes an unqualified resource and returns back a Group qualified GroupResource

func SetTagConditions added in v1.1.2

func SetTagConditions(stream *ImageStream, tag string, conditions ...TagEventCondition)

SetTagConditions applies the specified conditions to the status of the given tag.

func ShortDockerImageID added in v1.0.7

func ShortDockerImageID(image *DockerImage, length int) string

ShortDockerImageID returns a short form of the provided DockerImage ID for display

func SortStatusTags added in v1.0.6

func SortStatusTags(tags map[string]TagEventList) []string

SortStatusTags sorts the status tags of an image stream based on the latest created

func SplitImageStreamTag added in v0.5.1

func SplitImageStreamTag(nameAndTag string) (name string, tag string, ok bool)

SplitImageStreamTag turns the name of an ImageStreamTag into Name and Tag. It returns false if the tag was not properly specified in the name.

func UpdateChangedTrackingTags added in v1.0.7

func UpdateChangedTrackingTags(new, old *ImageStream) int

UpdateChangedTrackingTags identifies any tags in the status that have changed and ensures any referenced tracking tags are also updated. It returns the number of updates applied.

func UpdateTrackingTags added in v0.5.1

func UpdateTrackingTags(stream *ImageStream, updatedTag string, updatedImage TagEvent) int

UpdateTrackingTags sets updatedImage as the most recent TagEvent for all tags in stream.spec.tags that have from.kind = "ImageStreamTag" and the tag in from.name = updatedTag. from.name may be either <tag> or <stream name>:<tag>. For now, only references to tags in the current stream are supported.

For example, if stream.spec.tags[latest].from.name = 2.0, whenever an image is pushed to this stream with the tag 2.0, status.tags[latest].items[0] will also be updated to point at the same image that was just pushed for 2.0.

Returns the number of tags changed.

Types

type DockerConfig added in v0.2.1

type DockerConfig struct {
	Hostname        string              `json:"Hostname,omitempty"`
	Domainname      string              `json:"Domainname,omitempty"`
	User            string              `json:"User,omitempty"`
	Memory          int64               `json:"Memory,omitempty"`
	MemorySwap      int64               `json:"MemorySwap,omitempty"`
	CPUShares       int64               `json:"CpuShares,omitempty"`
	CPUSet          string              `json:"Cpuset,omitempty"`
	AttachStdin     bool                `json:"AttachStdin,omitempty"`
	AttachStdout    bool                `json:"AttachStdout,omitempty"`
	AttachStderr    bool                `json:"AttachStderr,omitempty"`
	PortSpecs       []string            `json:"PortSpecs,omitempty"`
	ExposedPorts    map[string]struct{} `json:"ExposedPorts,omitempty"`
	Tty             bool                `json:"Tty,omitempty"`
	OpenStdin       bool                `json:"OpenStdin,omitempty"`
	StdinOnce       bool                `json:"StdinOnce,omitempty"`
	Env             []string            `json:"Env,omitempty"`
	Cmd             []string            `json:"Cmd,omitempty"`
	DNS             []string            `json:"Dns,omitempty"` // For Docker API v1.9 and below only
	Image           string              `json:"Image,omitempty"`
	Volumes         map[string]struct{} `json:"Volumes,omitempty"`
	VolumesFrom     string              `json:"VolumesFrom,omitempty"`
	WorkingDir      string              `json:"WorkingDir,omitempty"`
	Entrypoint      []string            `json:"Entrypoint,omitempty"`
	NetworkDisabled bool                `json:"NetworkDisabled,omitempty"`
	SecurityOpts    []string            `json:"SecurityOpts,omitempty"`
	OnBuild         []string            `json:"OnBuild,omitempty"`
	Labels          map[string]string   `json:"Labels,omitempty"`
}

DockerConfig is the list of configuration options used when creating a container.

type DockerFSLayer added in v0.4.2

type DockerFSLayer struct {
	// DockerBlobSum is the tarsum of the referenced filesystem image layer
	// TODO make this digest.Digest once docker/distribution is in Godeps
	DockerBlobSum string `json:"blobSum"`
}

DockerFSLayer is a container struct for BlobSums defined in an image manifest

type DockerHistory added in v0.4.2

type DockerHistory struct {
	// DockerV1Compatibility is the raw v1 compatibility information
	DockerV1Compatibility string `json:"v1Compatibility"`
}

DockerHistory stores unstructured v1 compatibility information

type DockerImage added in v0.2.1

type DockerImage struct {
	unversioned.TypeMeta `json:",inline"`

	ID              string           `json:"Id"`
	Parent          string           `json:"Parent,omitempty"`
	Comment         string           `json:"Comment,omitempty"`
	Created         unversioned.Time `json:"Created,omitempty"`
	Container       string           `json:"Container,omitempty"`
	ContainerConfig DockerConfig     `json:"ContainerConfig,omitempty"`
	DockerVersion   string           `json:"DockerVersion,omitempty"`
	Author          string           `json:"Author,omitempty"`
	Config          *DockerConfig    `json:"Config,omitempty"`
	Architecture    string           `json:"Architecture,omitempty"`
	Size            int64            `json:"Size,omitempty"`
}

DockerImage is the type representing a docker image and its various properties when retrieved from the Docker client API.

func (*DockerImage) IsAnAPIObject added in v0.2.1

func (*DockerImage) IsAnAPIObject()

type DockerImageManifest added in v0.4.2

type DockerImageManifest struct {
	SchemaVersion int    `json:"schemaVersion"`
	MediaType     string `json:"mediaType,omitempty"`

	// schema1
	Name         string          `json:"name"`
	Tag          string          `json:"tag"`
	Architecture string          `json:"architecture"`
	FSLayers     []DockerFSLayer `json:"fsLayers"`
	History      []DockerHistory `json:"history"`

	// schema2
	Layers []distribution.Descriptor `json:"layers"`
	Config distribution.Descriptor   `json:"config"`
}

DockerImageManifest represents the Docker v2 image format.

type DockerImageReference added in v0.4.2

type DockerImageReference struct {
	Registry  string
	Namespace string
	Name      string
	Tag       string
	ID        string
}

DockerImageReference points to a Docker image.

func DockerImageReferenceForStream added in v0.4.3

func DockerImageReferenceForStream(stream *ImageStream) (DockerImageReference, error)

DockerImageReferenceForStream returns a DockerImageReference that represents the ImageStream or false, if no valid reference exists.

func ParseDockerImageReference added in v0.4.2

func ParseDockerImageReference(spec string) (DockerImageReference, error)

ParseDockerImageReference parses a Docker pull spec string into a DockerImageReference.

func (DockerImageReference) AsRepository added in v1.0.7

func (r DockerImageReference) AsRepository() DockerImageReference

AsRepository returns the reference without tags or IDs.

func (DockerImageReference) AsV2 added in v1.1.2

func (DockerImageReference) DaemonMinimal added in v1.0.7

func (r DockerImageReference) DaemonMinimal() DockerImageReference

DaemonMinimal clears defaults that Docker assumes.

func (DockerImageReference) DockerClientDefaults added in v0.4.2

func (r DockerImageReference) DockerClientDefaults() DockerImageReference

DockerClientDefaults sets the default values used by the Docker client.

func (DockerImageReference) Equal added in v1.1.1

Equal returns true if the other DockerImageReference is equivalent to the reference r. The comparison applies defaults to the Docker image reference, so that e.g., "foobar" equals "docker.io/library/foobar:latest".

func (DockerImageReference) Exact added in v1.0.7

func (r DockerImageReference) Exact() string

Exact returns a string representation of the set fields on the DockerImageReference

func (DockerImageReference) Minimal added in v0.4.3

Minimal reduces a DockerImageReference to its minimalist form.

func (DockerImageReference) MostSpecific added in v1.1.2

func (r DockerImageReference) MostSpecific() DockerImageReference

MostSpecific returns the most specific image reference that can be constructed from the current ref, preferring an ID over a Tag. Allows client code dealing with both tags and IDs to get the most specific reference easily.

func (DockerImageReference) NameString added in v1.0.5

func (r DockerImageReference) NameString() string

NameString returns the name of the reference with its tag or ID.

func (DockerImageReference) RegistryURL added in v1.1.2

func (r DockerImageReference) RegistryURL() *url.URL

RepositoryName returns the registry relative name

func (DockerImageReference) RepositoryName added in v1.1.2

func (r DockerImageReference) RepositoryName() string

RepositoryName returns the registry relative name

func (DockerImageReference) String added in v0.4.2

func (r DockerImageReference) String() string

String converts a DockerImageReference to a Docker pull spec (which implies a default namespace according to V1 Docker registry rules). Use Exact() if you want no defaulting.

type DockerV1CompatibilityImage added in v0.4.2

type DockerV1CompatibilityImage struct {
	ID              string           `json:"id"`
	Parent          string           `json:"parent,omitempty"`
	Comment         string           `json:"comment,omitempty"`
	Created         unversioned.Time `json:"created"`
	Container       string           `json:"container,omitempty"`
	ContainerConfig DockerConfig     `json:"container_config,omitempty"`
	DockerVersion   string           `json:"docker_version,omitempty"`
	Author          string           `json:"author,omitempty"`
	Config          *DockerConfig    `json:"config,omitempty"`
	Architecture    string           `json:"architecture,omitempty"`
	Size            int64            `json:"size,omitempty"`
}

DockerV1CompatibilityImage represents the structured v1 compatibility information.

type DockerV1CompatibilityImageSize added in v1.1.2

type DockerV1CompatibilityImageSize struct {
	Size int64 `json:"size,omitempty"`
}

DockerV1CompatibilityImageSize represents the structured v1 compatibility information for size

type Image

type Image struct {
	unversioned.TypeMeta
	kapi.ObjectMeta

	// The string that can be used to pull this image.
	DockerImageReference string
	// Metadata about this image
	DockerImageMetadata DockerImage
	// This attribute conveys the version of docker metadata the JSON should be stored in, which if empty defaults to "1.0"
	DockerImageMetadataVersion string
	// The raw JSON of the manifest
	DockerImageManifest string
	// DockerImageLayers represents the layers in the image. May not be set if the image does not define that data.
	DockerImageLayers []ImageLayer
}

Image is an immutable representation of a Docker image and metadata at a point in time.

func (*Image) IsAnAPIObject

func (*Image) IsAnAPIObject()

type ImageImportSpec added in v1.1.2

type ImageImportSpec struct {
	From kapi.ObjectReference
	To   *kapi.LocalObjectReference

	ImportPolicy    TagImportPolicy
	IncludeManifest bool
}

ImageImportSpec defines how an image is imported.

type ImageImportStatus added in v1.1.2

type ImageImportStatus struct {
	Tag    string
	Status unversioned.Status
	Image  *Image
}

ImageImportStatus describes the result of an image import.

type ImageLayer added in v1.1.2

type ImageLayer struct {
	// Name of the layer as defined by the underlying store.
	Name string
	// Size of the layer as defined by the underlying store.
	Size int64
}

ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none.

type ImageList

type ImageList struct {
	unversioned.TypeMeta
	unversioned.ListMeta

	Items []Image
}

ImageList is a list of Image objects.

func (*ImageList) IsAnAPIObject

func (*ImageList) IsAnAPIObject()

type ImageStream added in v0.4.3

type ImageStream struct {
	unversioned.TypeMeta
	kapi.ObjectMeta

	// Spec describes the desired state of this stream
	Spec ImageStreamSpec
	// Status describes the current state of this stream
	Status ImageStreamStatus
}

ImageStream stores a mapping of tags to images, metadata overrides that are applied when images are tagged in a stream, and an optional reference to a Docker image repository on a registry.

func (*ImageStream) IsAnAPIObject added in v0.4.3

func (*ImageStream) IsAnAPIObject()

type ImageStreamImage added in v0.4.2

type ImageStreamImage struct {
	unversioned.TypeMeta
	kapi.ObjectMeta

	// The Image associated with the ImageStream and image name.
	Image Image
}

ImageStreamImage represents an Image that is retrieved by image name from an ImageStream.

func (*ImageStreamImage) IsAnAPIObject added in v0.6.1

func (*ImageStreamImage) IsAnAPIObject()

type ImageStreamImport added in v1.1.2

type ImageStreamImport struct {
	unversioned.TypeMeta
	// ObjectMeta must identify the name of the image stream to create or update. If resourceVersion
	// or UID are set, they must match the image stream that will be loaded from the server.
	kapi.ObjectMeta

	// Spec is the set of items desired to be imported
	Spec ImageStreamImportSpec
	// Status is the result of the import
	Status ImageStreamImportStatus
}

ImageStreamImport allows a caller to request information about a set of images for possible import into an image stream, or actually tag the images into the image stream.

func (*ImageStreamImport) IsAnAPIObject added in v1.1.2

func (*ImageStreamImport) IsAnAPIObject()

type ImageStreamImportSpec added in v1.1.2

type ImageStreamImportSpec struct {
	// Import indicates whether to perform an import - if so, the specified tags are set on the spec
	// and status of the image stream defined by the type meta.
	Import bool
	// Repository is an optional import of an entire Docker image repository. A maximum limit on the
	// number of tags imported this way is imposed by the server.
	Repository *RepositoryImportSpec
	// Images are a list of individual images to import.
	Images []ImageImportSpec
}

ImageStreamImportSpec defines what images should be imported.

type ImageStreamImportStatus added in v1.1.2

type ImageStreamImportStatus struct {
	// Import is the image stream that was successfully updated or created when 'to' was set.
	Import *ImageStream
	// Repository is set if spec.repository was set to the outcome of the import
	Repository *RepositoryImportStatus
	// Images is set with the result of importing spec.images
	Images []ImageImportStatus
}

ImageStreamImportStatus contains information about the status of an image stream import.

type ImageStreamList added in v0.4.3

type ImageStreamList struct {
	unversioned.TypeMeta
	unversioned.ListMeta

	Items []ImageStream
}

ImageStreamList is a list of ImageStream objects.

func (*ImageStreamList) IsAnAPIObject added in v0.4.3

func (*ImageStreamList) IsAnAPIObject()

type ImageStreamMapping added in v0.4.3

type ImageStreamMapping struct {
	unversioned.TypeMeta
	kapi.ObjectMeta

	// The Docker image repository the specified image is located in
	// DEPRECATED: remove once v1beta1 support is dropped
	DockerImageRepository string
	// A Docker image.
	Image Image
	// A string value this image can be located with inside the repository.
	Tag string
}

ImageStreamMapping represents a mapping from a single tag to a Docker image as well as the reference to the Docker image repository the image came from.

func (*ImageStreamMapping) IsAnAPIObject added in v0.4.3

func (*ImageStreamMapping) IsAnAPIObject()

type ImageStreamSpec added in v0.4.3

type ImageStreamSpec struct {
	// Optional, if specified this stream is backed by a Docker repository on this server
	DockerImageRepository string
	// Tags map arbitrary string values to specific image locators
	Tags map[string]TagReference
}

ImageStreamSpec represents options for ImageStreams.

type ImageStreamStatus added in v0.4.3

type ImageStreamStatus struct {
	// DockerImageRepository represents the effective location this stream may be accessed at. May be empty until the server
	// determines where the repository is located
	DockerImageRepository string
	// A historical record of images associated with each tag. The first entry in the TagEvent array is
	// the currently tagged image.
	Tags map[string]TagEventList
}

ImageStreamStatus contains information about the state of this image stream.

type ImageStreamTag added in v0.4.3

type ImageStreamTag struct {
	unversioned.TypeMeta
	kapi.ObjectMeta

	// The Image associated with the ImageStream and tag.
	Image Image
}

ImageStreamTag has a .Name in the format <stream name>:<tag>.

func (*ImageStreamTag) IsAnAPIObject added in v0.4.3

func (*ImageStreamTag) IsAnAPIObject()

type ImageStreamTagList added in v1.0.8

type ImageStreamTagList struct {
	unversioned.TypeMeta
	unversioned.ListMeta

	Items []ImageStreamTag
}

ImageStreamTagList is a list of ImageStreamTag objects.

func (*ImageStreamTagList) IsAnAPIObject added in v1.0.8

func (*ImageStreamTagList) IsAnAPIObject()

type RepositoryImportSpec added in v1.1.2

type RepositoryImportSpec struct {
	// The source of the import, only kind DockerImage is supported
	From kapi.ObjectReference

	ImportPolicy    TagImportPolicy
	IncludeManifest bool
}

RepositoryImport indicates to load a set of tags from a given Docker image repository

type RepositoryImportStatus added in v1.1.2

type RepositoryImportStatus struct {
	// Status reflects whether any failure occurred during import
	Status unversioned.Status
	// Images is the list of imported images
	Images []ImageImportStatus
	// AdditionalTags are tags that exist in the repository but were not imported because
	// a maximum limit of automatic imports was applied.
	AdditionalTags []string
}

RepositoryImportStatus describes the outcome of the repository import

type TagEvent added in v0.4.2

type TagEvent struct {
	// When the TagEvent was created
	Created unversioned.Time
	// The string that can be used to pull this image
	DockerImageReference string
	// The image
	Image string
	// Generation is the spec tag generation that resulted in this tag being updated
	Generation int64
}

TagEvent is used by ImageRepositoryStatus to keep a historical record of images associated with a tag.

func LatestTaggedImage added in v0.4.2

func LatestTaggedImage(stream *ImageStream, tag string) *TagEvent

LatestTaggedImage returns the most recent TagEvent for the specified image repository and tag. Will resolve lookups for the empty tag. Returns nil if tag isn't present in stream.status.tags.

func ResolveImageID added in v0.6.1

func ResolveImageID(stream *ImageStream, imageID string) (*TagEvent, error)

ResolveImageID returns latest TagEvent for specified imageID and an error if there's more than one image matching the ID or when one does not exist.

type TagEventCondition added in v1.1.2

type TagEventCondition struct {
	// Type of tag event condition, currently only ImportSuccess
	Type TagEventConditionType
	// Status of the condition, one of True, False, Unknown.
	Status kapi.ConditionStatus
	// LastTransitionTIme is the time the condition transitioned from one status to another.
	LastTransitionTime unversioned.Time
	// Reason is a brief machine readable explanation for the condition's last transition.
	Reason string
	// Message is a human readable description of the details about last transition, complementing reason.
	Message string
	// Generation is the spec tag generation that this status corresponds to. If this value is
	// older than the spec tag generation, the user has requested this status tag be updated.
	// This value is set to zero for older versions of streams, which means that no generation
	// was recorded.
	Generation int64
}

TagEventCondition contains condition information for a tag event.

type TagEventConditionType added in v1.1.2

type TagEventConditionType string
const (
	// ImportSuccess with status False means the import of the specific tag failed
	ImportSuccess TagEventConditionType = "ImportSuccess"
)

These are valid conditions of TagEvents.

type TagEventList added in v0.4.2

type TagEventList struct {
	Items []TagEvent
	// Conditions is an array of conditions that apply to the tag event list.
	Conditions []TagEventCondition
}

TagEventList contains a historical record of images associated with a tag.

type TagImportPolicy added in v1.1.2

type TagImportPolicy struct {
	// Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import.
	Insecure bool
	// Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported
	Scheduled bool
}

type TagReference added in v0.4.3

type TagReference struct {
	// Name of the tag
	Name string
	// Optional; if specified, annotations that are applied to images retrieved via ImageStreamTags.
	Annotations map[string]string
	// Optional; if specified, a reference to another image that this tag should point to. Valid values
	// are ImageStreamTag, ImageStreamImage, and DockerImage.
	From *kapi.ObjectReference
	// Reference states if the tag will be imported. Default value is false, which means the tag will
	// be imported.
	Reference bool
	// Generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference
	// is changed the generation is set to match the current stream generation (which is incremented every
	// time spec is changed). Other processes in the system like the image importer observe that the
	// generation of spec tag is newer than the generation recorded in the status and use that as a trigger
	// to import the newest remote tag. To trigger a new import, clients may set this value to zero which
	// will reset the generation to the latest stream generation. Legacy clients will send this value as
	// nil which will be merged with the current tag generation.
	Generation *int64
	// ImportPolicy is information that controls how images may be imported by the server.
	ImportPolicy TagImportPolicy
}

TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track.

func FollowTagReference added in v1.1.2

func FollowTagReference(stream *ImageStream, tag string) (finalTag string, ref *TagReference, ok bool, multiple bool)

FollowTagReference walks through the defined tags on a stream, following any referential tags in the stream. Will return ok if the tag is valid, multiple if the tag had at least reference, and ref and finalTag will be the last tag seen. If a circular loop is found ok will be false.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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