history

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerRevisionHashLabel = "controller.kubernetes.io/hash"

ControllerRevisionHashLabel is the label used to indicate the hash value of a ControllerRevision's Data.

Variables

This section is empty.

Functions

func ControllerRevisionName

func ControllerRevisionName(prefix string, hash string) string

ControllerRevisionName returns the Name for a ControllerRevision in the form prefix-hash. If the length of prefix is greater than 223 bytes, it is truncated to allow for a name that is no larger than 253 bytes.

func EqualRevision

func EqualRevision(lhs *apps.ControllerRevision, rhs *apps.ControllerRevision) bool

EqualRevision returns true if lhs and rhs are either both nil, or both point to non-nil ControllerRevisions that contain semantically equivalent data. Otherwise this method returns false.

func FindEqualRevisions

func FindEqualRevisions(revisions []*apps.ControllerRevision, needle *apps.ControllerRevision) []*apps.ControllerRevision

FindEqualRevisions returns all ControllerRevisions in revisions that are equal to needle using EqualRevision as the equality test. The returned slice preserves the order of revisions.

func HashControllerRevision

func HashControllerRevision(revision *apps.ControllerRevision, probe *int32) string

HashControllerRevision hashes the contents of revision's Data using FNV hashing. If probe is not nil, the byte value of probe is added written to the hash as well. The returned hash will be a safe encoded string to avoid bad words.

func NewControllerRevision

func NewControllerRevision(parent metav1.Object,
	parentKind schema.GroupVersionKind,
	templateLabels map[string]string,
	data runtime.RawExtension,
	revision int64,
	collisionCount *int32) (*apps.ControllerRevision, error)

NewControllerRevision returns a ControllerRevision with a ControllerRef pointing to parent and indicating that parent is of parentKind. The ControllerRevision has labels matching template labels, contains Data equal to data, and has a Revision equal to revision. The collisionCount is used when creating the name of the ControllerRevision so the name is likely unique. If the returned error is nil, the returned ControllerRevision is valid. If the returned error is not nil, the returned ControllerRevision is invalid for use.

func SortControllerRevisions

func SortControllerRevisions(revisions []*apps.ControllerRevision)

SortControllerRevisions sorts revisions by their Revision.

Types

This section is empty.

Jump to

Keyboard shortcuts

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