Revert "Periodically update pod status from kubelet."
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user