util

package
v0.0.0-...-0f541f5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExecutionControllerFinalizer is added to Work to ensure manifests propagated to member cluster
	// is deleted before Work itself is deleted.
	ExecutionControllerFinalizer = "karmada.io/execution-controller"
)
View Source
const ExecutionSpacePrefix = "karmada-es-"

ExecutionSpacePrefix is the prefix of execution space

Variables

This section is empty.

Functions

func DeepHashObject

func DeepHashObject(hasher hash.Hash, objectToWrite interface{})

DeepHashObject writes specified object to hash using the pretty library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.

func GenerateExecutionSpaceName

func GenerateExecutionSpaceName(clusterName string) (string, error)

GenerateExecutionSpaceName generates execution space name for the given member cluster

func GenerateWorkName

func GenerateWorkName(kind, name, namespace string) string

GenerateWorkName will generate work name by its name and the hash of its namespace, kind and name.

func MergeLabel

func MergeLabel(obj *unstructured.Unstructured, labelKey string, labelValue string)

MergeLabel adds label for the given object.

func ToUnstructured

func ToUnstructured(obj interface{}) (*unstructured.Unstructured, error)

ToUnstructured converts a typed object to an unstructured object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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