Documentation ¶
Index ¶
- Constants
- func DeepHashObject(hasher hash.Hash, objectToWrite interface{})
- func GenerateExecutionSpaceName(clusterName string) (string, error)
- func GenerateWorkName(kind, name, namespace string) string
- func MergeLabel(obj *unstructured.Unstructured, labelKey string, labelValue string)
- func ToUnstructured(obj interface{}) (*unstructured.Unstructured, error)
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 ¶
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 ¶
GenerateExecutionSpaceName generates execution space name for the given member cluster
func GenerateWorkName ¶
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.
Click to show internal directories.
Click to hide internal directories.