utils

package
Version: v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearObjectHash

func ClearObjectHash(obj runtime.Object)

Takes a Kubernetes object and removes the annotation with its hash.

func GetObjectHash

func GetObjectHash(obj runtime.Object) string

Takes a Kubernetes object and returns the hash in its annotations as a string.

func GetTargetPort

func GetTargetPort(port corev1.ServicePort, pod corev1.Pod) int

Return an integer target port from a ServicePort for a pod.

func HashObject

func HashObject(obj runtime.Object) string

Return a SHA1 hash of a Kubernetes object

func MergeMaps

func MergeMaps(base map[string]string, second map[string]string) map[string]string

Merge two maps. The keys in second will overwrite any matching keys in base.

func SetObjectHash

func SetObjectHash(obj runtime.Object)

Takes a Kubernetes object and adds an annotation with its hash.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL