mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 13:55:20 +00:00
Add pod exec backup hooks
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
This commit is contained in:
@@ -32,12 +32,10 @@ import (
|
||||
)
|
||||
|
||||
// NamespaceAndName returns a string in the format <namespace>/<name>
|
||||
func NamespaceAndName(metaAccessor metav1.ObjectMetaAccessor) string {
|
||||
objMeta := metaAccessor.GetObjectMeta()
|
||||
if objMeta == nil {
|
||||
return ""
|
||||
func NamespaceAndName(objMeta metav1.Object) string {
|
||||
if objMeta.GetNamespace() == "" {
|
||||
return objMeta.GetName()
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s/%s", objMeta.GetNamespace(), objMeta.GetName())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user