Add SelfLink to Kubelet http source.

This commit is contained in:
Victor Marmol
2015-03-18 16:13:47 -07:00
parent 1e5eec62ef
commit ce96182cc3
3 changed files with 7 additions and 6 deletions

View File

@@ -206,5 +206,7 @@ func applyDefaults(pod *api.Pod, url string) error {
// Always overrides the namespace.
pod.Namespace = kubelet.NamespaceDefault
glog.V(5).Infof("Using namespace %q for pod %q from URL %s", pod.Namespace, pod.Name, url)
pod.ObjectMeta.SelfLink = fmt.Sprintf("/api/v1beta2/pods/%s?namespace=%s",
pod.Name, pod.Namespace)
return nil
}