instanceidhandler

package
v0.0.200 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 21 Imported by: 13

Documentation

Index

Constants

View Source
const (
	Container          = "container"
	InitContainer      = "initContainer"
	EphemeralContainer = "ephemeralContainer"
)

Variables

This section is empty.

Functions

func DeepHashObject added in v0.0.170

func DeepHashObject(hasher hash.Hash32, pod *corev1.PodSpec, extraJsonPaths []string)

func GenerateInstanceID

func GenerateInstanceID(w workloadinterface.IWorkload, jsonPaths []string) ([]instanceidhandler.IInstanceID, error)

GenerateInstanceID generates instance ID from workload Pods created by a CronJob have an alternate naming convention, using a calculated pod template hash, jsonPaths can be specified to drop fields from the pod spec before hashing.

func GenerateInstanceIDFromPod added in v0.0.114

func GenerateInstanceIDFromPod(pod *corev1.Pod) ([]instanceidhandler.IInstanceID, error)

GenerateInstanceIDFromPod generates instance ID from pod Deprecated: use GenerateInstanceIDFromRuntimeObj instead

func GenerateInstanceIDFromRuntimeObj added in v0.0.199

func GenerateInstanceIDFromRuntimeObj(w runtime.Object, jsonPaths []string) ([]instanceidhandler.IInstanceID, error)

GenerateInstanceIDFromRuntimeObj generates instance ID from pod Pods created by a CronJob have an alternate naming convention, using a calculated pod template hash, jsonPaths can be specified to drop fields from the pod spec before hashing.

func GenerateInstanceIDFromString added in v0.0.114

func GenerateInstanceIDFromString(input string) (instanceidhandler.IInstanceID, error)

GenerateInstanceIDFromString generates instance ID from string The string format is: apiVersion-<apiVersion>/namespace-<namespace>/kind-<kind>/name-<name>/...

func GetGvkFromRuntimeObj added in v0.0.199

func GetGvkFromRuntimeObj(w runtime.Object) (schema.GroupVersionKind, error)

func GetPodSpecFromRuntimeObj added in v0.0.199

func GetPodSpecFromRuntimeObj(w runtime.Object) (v1.PodSpec, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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