Revert "Periodically update pod status from kubelet."

This commit is contained in:
Filip Grzadkowski
2015-03-17 13:51:45 +01:00
parent c04ceec27f
commit 18b728ff44
11 changed files with 37 additions and 115 deletions

View File

@@ -18,7 +18,6 @@ package kubelet
import (
"fmt"
"strings"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
)
@@ -69,19 +68,12 @@ type PodUpdate struct {
}
// GetPodFullName returns a name that uniquely identifies a pod across all config sources.
// NOTE: If changed ParsePodFullName must be also updated.
func GetPodFullName(pod *api.Pod) string {
// Use underscore as the delimiter because it is not allowed in pod name
// (DNS subdomain format), while allowed in the container name format.
return fmt.Sprintf("%s_%s", pod.Name, pod.Namespace)
}
// ParsePodFullName parses full name generated by GetPodFullName and returns parts of it.
func ParsePodFullName(podFullName string) (name, namespace string) {
nameParts := strings.Split(podFullName, "_")
return nameParts[0], nameParts[1]
}
// Build the pod full name from pod name and namespace.
func BuildPodFullName(name, namespace string) string {
return name + "_" + namespace