Documentation
¶
Index ¶
- Constants
- func DeepHashObject(hasher hash.Hash32, pod *corev1.PodSpec, extraJsonPaths []string)
- func GenerateInstanceID(w workloadinterface.IWorkload, jsonPaths []string) ([]instanceidhandler.IInstanceID, error)
- func GenerateInstanceIDFromPod(pod *corev1.Pod) ([]instanceidhandler.IInstanceID, error)
- func GenerateInstanceIDFromRuntimeObj(w runtime.Object, jsonPaths []string) ([]instanceidhandler.IInstanceID, error)
- func GenerateInstanceIDFromString(input string) (instanceidhandler.IInstanceID, error)
- func GetGvkFromRuntimeObj(w runtime.Object) (schema.GroupVersionKind, error)
- func GetPodSpecFromRuntimeObj(w runtime.Object) (v1.PodSpec, error)
Constants ¶
const ( Container = "container" InitContainer = "initContainer" EphemeralContainer = "ephemeralContainer" )
Variables ¶
This section is empty.
Functions ¶
func DeepHashObject ¶ added in v0.0.170
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)
Types ¶
This section is empty.