controllerrevisions

package
v1.32.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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