Switch on Cacher for pods, endpoints and nodes.

This commit is contained in:
Wojciech Tyczynski
2015-08-17 09:59:12 +02:00
parent 44fa48e5af
commit ec6556987e
10 changed files with 151 additions and 21 deletions

View File

@@ -58,3 +58,11 @@ func NamespaceKeyFunc(prefix string, obj runtime.Object) (string, error) {
}
return prefix + "/" + meta.Namespace() + "/" + meta.Name(), nil
}
func NoNamespaceKeyFunc(prefix string, obj runtime.Object) (string, error) {
meta, err := meta.Accessor(obj)
if err != nil {
return "", err
}
return prefix + "/" + meta.Name(), nil
}