annotations

package
v3.10.15-1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerForObjectFieldPath

func ContainerForObjectFieldPath(obj runtime.Object, fieldPath string) (ometa.ContainerMutator, string, error)

ContainerForObjectFieldPath returns a reference to the container in the object with pod spec underneath fieldPath. Returns error if no such container exists or the field path is invalid. Returns the remaining field path beyond the container, if any.

func ContainerImageChanged

func ContainerImageChanged(oldObj, newObj runtime.Object, newTriggers []triggerapi.ObjectFieldTrigger) bool

ContainerImageChanged returns true if any container image referenced by newTriggers changed.

func NewAnnotationTriggerIndexer

func NewAnnotationTriggerIndexer(prefix string) trigger.Indexer

NewAnnotationTriggerIndexer creates an indexer that deals with objects that have a pod spec and use annotations to indicate the desire to trigger.

func UpdateObjectFromImages

func UpdateObjectFromImages(obj runtime.Object, tagRetriever trigger.TagRetriever) (runtime.Object, error)

UpdateObjectFromImages attempts to set the appropriate object information. If changes are necessary, it lazily copies obj and returns it, or if no changes are necessary returns nil.

Types

type AnnotationReactor

type AnnotationReactor struct {
	Updater AnnotationUpdater
}

func (*AnnotationReactor) ImageChanged

func (r *AnnotationReactor) ImageChanged(obj runtime.Object, tagRetriever trigger.TagRetriever) error

type AnnotationUpdater

type AnnotationUpdater interface {
	Update(obj runtime.Object) error
}

Jump to

Keyboard shortcuts

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