diff --git a/pkg/api/v1beta1/conversion.go b/pkg/api/v1beta1/conversion.go index b2d1dc9225f09..cc5cec460e858 100644 --- a/pkg/api/v1beta1/conversion.go +++ b/pkg/api/v1beta1/conversion.go @@ -1384,7 +1384,7 @@ func init() { case "name": return "name", value, nil case "DesiredState.Host": - return "status.host", value, nil + return "spec.host", value, nil case "DesiredState.Status": podStatus := PodStatus(value) var internalValue newer.PodPhase diff --git a/pkg/api/v1beta2/conversion.go b/pkg/api/v1beta2/conversion.go index ef5d65aee0acc..40dde8c440701 100644 --- a/pkg/api/v1beta2/conversion.go +++ b/pkg/api/v1beta2/conversion.go @@ -1300,7 +1300,7 @@ func init() { case "name": return "name", value, nil case "DesiredState.Host": - return "status.host", value, nil + return "spec.host", value, nil case "DesiredState.Status": podStatus := PodStatus(value) var internalValue newer.PodPhase diff --git a/pkg/api/v1beta3/conversion.go b/pkg/api/v1beta3/conversion.go index c37c817f96979..2593e864c199f 100644 --- a/pkg/api/v1beta3/conversion.go +++ b/pkg/api/v1beta3/conversion.go @@ -31,7 +31,7 @@ func init() { fallthrough case "status.phase": fallthrough - case "status.host": + case "spec.host": return label, value, nil default: return "", "", fmt.Errorf("field label not supported: %s", label) diff --git a/pkg/apiserver/resthandler.go b/pkg/apiserver/resthandler.go index ef627178b352b..dcb6a744bf282 100644 --- a/pkg/apiserver/resthandler.go +++ b/pkg/apiserver/resthandler.go @@ -194,7 +194,6 @@ func CreateResource(r RESTCreater, ctxFn ContextFunc, namer ScopeNamer, codec ru func PatchResource(r RESTPatcher, ctxFn ContextFunc, namer ScopeNamer, codec runtime.Codec, typer runtime.ObjectTyper, resource string, admit admission.Interface) restful.RouteFunction { return func(req *restful.Request, res *restful.Response) { w := res.ResponseWriter - glog.Infof("hi") // TODO: we either want to remove timeout or document it (if we document, move timeout out of this function and declare it in api_installer) timeout := parseTimeout(req.Request.URL.Query().Get("timeout")) diff --git a/pkg/client/cache/listwatch_test.go b/pkg/client/cache/listwatch_test.go index 673b7e6f917d1..8af21d2ccc14f 100644 --- a/pkg/client/cache/listwatch_test.go +++ b/pkg/client/cache/listwatch_test.go @@ -53,7 +53,7 @@ func getHostFieldLabel() string { case "v1beta1", "v1beta2": return "DesiredState.Host" default: - return "status.host" + return "spec.host" } } diff --git a/pkg/kubelet/config/apiserver.go b/pkg/kubelet/config/apiserver.go index 042518537bb90..cd3d306e74a48 100644 --- a/pkg/kubelet/config/apiserver.go +++ b/pkg/kubelet/config/apiserver.go @@ -57,6 +57,6 @@ func getHostFieldLabel(apiVersion string) string { case "v1beta1", "v1beta2": return "DesiredState.Host" default: - return "status.host" + return "spec.host" } } diff --git a/pkg/registry/pod/etcd/etcd_test.go b/pkg/registry/pod/etcd/etcd_test.go index 5f8d5dc1cb887..05994b8546a5d 100644 --- a/pkg/registry/pod/etcd/etcd_test.go +++ b/pkg/registry/pod/etcd/etcd_test.go @@ -300,7 +300,7 @@ func TestListPodListSelection(t *testing.T) { })}, {Value: runtime.EncodeOrDie(latest.Codec, &api.Pod{ ObjectMeta: api.ObjectMeta{Name: "bar"}, - Status: api.PodStatus{Host: "barhost"}, + Spec: api.PodSpec{Host: "barhost"}, })}, {Value: runtime.EncodeOrDie(latest.Codec, &api.Pod{ ObjectMeta: api.ObjectMeta{Name: "baz"}, @@ -341,13 +341,13 @@ func TestListPodListSelection(t *testing.T) { field: "status.phase=Failed", expectedIDs: util.NewStringSet("baz"), }, { - field: "status.host=barhost", + field: "spec.host=barhost", expectedIDs: util.NewStringSet("bar"), }, { - field: "status.host=", + field: "spec.host=", expectedIDs: util.NewStringSet("foo", "baz", "qux", "zot"), }, { - field: "status.host!=", + field: "spec.host!=", expectedIDs: util.NewStringSet("bar"), }, } diff --git a/pkg/registry/pod/rest.go b/pkg/registry/pod/rest.go index 6057a1d6921b9..6d7d6354f0c33 100644 --- a/pkg/registry/pod/rest.go +++ b/pkg/registry/pod/rest.go @@ -134,8 +134,8 @@ func MatchPod(label labels.Selector, field fields.Selector) generic.Matcher { func PodToSelectableFields(pod *api.Pod) labels.Set { return labels.Set{ "name": pod.Name, + "spec.host": pod.Spec.Host, "status.phase": string(pod.Status.Phase), - "status.host": pod.Status.Host, } } diff --git a/plugin/pkg/scheduler/factory/factory.go b/plugin/pkg/scheduler/factory/factory.go index 3ba0544dc2f60..5731e1b7eab10 100644 --- a/plugin/pkg/scheduler/factory/factory.go +++ b/plugin/pkg/scheduler/factory/factory.go @@ -154,7 +154,7 @@ func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys util.StringSe Binder: &binder{f.Client}, NextPod: func() *api.Pod { pod := f.PodQueue.Pop().(*api.Pod) - glog.V(2).Infof("glog.v2 --> About to try and schedule pod %v", pod.Name) + glog.V(2).Infof("About to try and schedule pod %v", pod.Name) return pod }, Error: f.makeDefaultErrorFunc(&podBackoff, f.PodQueue), @@ -259,7 +259,7 @@ func getHostFieldLabel(apiVersion string) string { case "v1beta1", "v1beta2": return "DesiredState.Host" default: - return "status.host" + return "spec.host" } }