Merge pull request #2391 from lavalamp/fix3

Remove confusing function; add TODO and explanation for (nonfatal) error...
pull/6/head
Dawn Chen 2014-11-14 17:24:18 -08:00
commit 8a508bcce3
2 changed files with 4 additions and 5 deletions

View File

@ -646,6 +646,7 @@ func ServeCachedManifestFile() (servingAddress string) {
const (
// This is copied from, and should be kept in sync with:
// https://raw.githubusercontent.com/GoogleCloudPlatform/container-vm-guestbook-redis-python/master/manifest.yaml
// Note that kubelet complains about these containers not having a self link.
testManifestFile = `version: v1beta2
id: container-vm-guestbook
containers:

View File

@ -268,11 +268,6 @@ func (self *podWorkers) Run(podFullName string, action func()) {
}()
}
// LogEvent reports an event.
func (kl *Kubelet) LogEvent(event *api.Event) error {
return nil
}
func makeEnvironmentVariables(container *api.Container) []string {
var result []string
for _, value := range container.Env {
@ -404,6 +399,9 @@ func fieldPath(pod *api.BoundPod, container *api.Container) (string, error) {
// containerRef returns an *api.ObjectReference which references the given container within the
// given pod. Returns an error if the reference can't be constructed or the container doesn't
// actually belong to the pod.
// TODO: Pods that came to us by static config or over HTTP have no selfLink set, which makes
// this fail and log an error. Figure out how we want to identify these pods to the rest of the
// system.
func containerRef(pod *api.BoundPod, container *api.Container) (*api.ObjectReference, error) {
fieldPath, err := fieldPath(pod, container)
if err != nil {