code: func encodePods(pods []*v1.Pod) (data []byte, err error) {
  	podList := new(v1.PodList)
  	for _, pod := range pods {
  		podList.Items = append(podList.Items, *pod)
  	}
  	// TODO: this needs to be parameterized to the kubelet, not hardcoded. Depends on Kubelet
  	//   as API server refactor.
  	// TODO: Locked to v1, needs to be made generic
  	codec := legacyscheme.Codecs.LegacyCodec(schema.GroupVersion{Group: v1.GroupName, Version: "v1"})
  	return runtime.Encode(codec, podList)
  }
docs: // encodePods creates an v1.PodList object from pods and returns the encoded
  // PodList.