controllerrevisions

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

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

ControllerRevisionHashLabel is the label key used to store the revision hash. Matches the upstream Kubernetes constant.

Variables

This section is empty.

Functions

func ControllerRevisionName

func ControllerRevisionName(prefix, hash string) string

ControllerRevisionName returns the name for a ControllerRevision in the form "{prefix}-{hash}". The prefix is truncated to 223 characters so the full name stays within Kubernetes' 253-character limit.

Upstream: https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/history/controller_history.go

func HashControllerRevision

func HashControllerRevision(revision *appsv1.ControllerRevision, collisionCount *int32) string

HashControllerRevision hashes the contents of revision's Data.Raw using FNV-32. If collisionCount is not nil, its value is also mixed into the hash to produce a distinct name on collision.

Upstream: https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/history/controller_history.go

func NewControllerRevision

func NewControllerRevision(
	owner metav1.Object,
	gvk schema.GroupVersionKind,
	labels map[string]string,
	data runtime.RawExtension,
	revision int64,
	collisionCount *int32,
) *appsv1.ControllerRevision

NewControllerRevision returns a ControllerRevision with a ControllerRef pointing to owner. The revision has labels matching the provided labels map (plus the hash label), Data set to data, and Revision set to revision.

Upstream: https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/history/controller_history.go

Types

This section is empty.

Jump to

Keyboard shortcuts

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