Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractNamespace ¶
func ExtractNamespace(np NamespaceNameGetter) string
ExtractNamespace extracts the namespace of ObjectMeta. For cluster scoped objects the Namespace field is empty and this function assumes that the object is returned from kubernetes itself implying that the namespace is empty only and only when the Object is cluster scoped and thus returns empty namespace for such objects.
func ExtractNamespaceOrDefault ¶
func ExtractNamespaceOrDefault(np NamespaceNameGetter) string
ExtractNamespaceOrDefault extracts the namespace of ObjectMeta, it returns default namespace if the namespace field in the ObjectMeta is empty.
func GetObjNamespaceName ¶
func GetObjNamespaceName(obj NamespaceNameGetter) string
GetObjNamespaceName returns the object's namespace and name. If the object is cluster scoped then the function returns only the object name without any namespace prefix.
Types ¶
type NamespaceNameGetter ¶
Click to show internal directories.
Click to hide internal directories.