Merge pull request #12340 from wojtek-t/rewrite_service_etcd

Refactor "service" registry to use standard REST storage (and generic etcd)
This commit is contained in:
Alex Robinson
2015-08-10 15:38:50 -07:00
12 changed files with 217 additions and 355 deletions

View File

@@ -20,10 +20,10 @@ package podtask
import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/registry/etcd"
"k8s.io/kubernetes/pkg/registry/generic/etcd"
)
// makePodKey constructs etcd paths to pod items enforcing namespace rules.
func MakePodKey(ctx api.Context, id string) (string, error) {
return etcd.MakeEtcdItemKey(ctx, PodPath, id)
return etcd.NamespaceKeyFunc(ctx, PodPath, id)
}