diff --git a/pkg/api/v1beta1/conversion.go b/pkg/api/v1beta1/conversion.go index 91feaddcf88..b2222b4a620 100644 --- a/pkg/api/v1beta1/conversion.go +++ b/pkg/api/v1beta1/conversion.go @@ -1337,12 +1337,12 @@ func init() { case "name": return "name", value, nil case "DesiredState.Host": - return "Status.Host", value, nil + return "status.host", value, nil case "DesiredState.Status": podStatus := PodStatus(value) var internalValue newer.PodPhase newer.Scheme.Convert(&podStatus, &internalValue) - return "Status.Phase", string(internalValue), nil + return "status.phase", string(internalValue), nil default: return "", "", fmt.Errorf("field label not supported: %s", label) } diff --git a/pkg/api/v1beta2/conversion.go b/pkg/api/v1beta2/conversion.go index 1df1a36fbf2..a16f2f61db4 100644 --- a/pkg/api/v1beta2/conversion.go +++ b/pkg/api/v1beta2/conversion.go @@ -1253,12 +1253,12 @@ func init() { case "name": return "name", value, nil case "DesiredState.Host": - return "Status.Host", value, nil + return "status.host", value, nil case "DesiredState.Status": podStatus := PodStatus(value) var internalValue newer.PodPhase newer.Scheme.Convert(&podStatus, &internalValue) - return "Status.Phase", string(internalValue), nil + return "status.phase", string(internalValue), nil default: return "", "", fmt.Errorf("field label not supported: %s", label) } diff --git a/pkg/api/v1beta3/conversion.go b/pkg/api/v1beta3/conversion.go index c84b301d419..c37c817f969 100644 --- a/pkg/api/v1beta3/conversion.go +++ b/pkg/api/v1beta3/conversion.go @@ -29,9 +29,9 @@ func init() { switch label { case "name": fallthrough - case "Status.Phase": + case "status.phase": fallthrough - case "Status.Host": + case "status.host": return label, value, nil default: return "", "", fmt.Errorf("field label not supported: %s", label) diff --git a/pkg/client/cache/listwatch_test.go b/pkg/client/cache/listwatch_test.go index 68ee01b56a6..673b7e6f917 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 "status.host" } } diff --git a/pkg/kubelet/config/apiserver.go b/pkg/kubelet/config/apiserver.go index 9800373360b..042518537bb 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 "status.host" } } diff --git a/pkg/registry/pod/etcd/etcd_test.go b/pkg/registry/pod/etcd/etcd_test.go index 3b6781e5c3e..c8e880366e8 100644 --- a/pkg/registry/pod/etcd/etcd_test.go +++ b/pkg/registry/pod/etcd/etcd_test.go @@ -337,16 +337,16 @@ func TestListPodListSelection(t *testing.T) { label: "label=qux", expectedIDs: util.NewStringSet("qux"), }, { - field: "Status.Phase=Failed", + field: "status.phase=Failed", expectedIDs: util.NewStringSet("baz"), }, { - field: "Status.Host=barhost", + field: "status.host=barhost", expectedIDs: util.NewStringSet("bar"), }, { - field: "Status.Host=", + field: "status.host=", expectedIDs: util.NewStringSet("foo", "baz", "qux", "zot"), }, { - field: "Status.Host!=", + field: "status.host!=", expectedIDs: util.NewStringSet("bar"), }, } diff --git a/pkg/registry/pod/rest.go b/pkg/registry/pod/rest.go index 91e0b8bace8..d992e970ead 100644 --- a/pkg/registry/pod/rest.go +++ b/pkg/registry/pod/rest.go @@ -132,8 +132,8 @@ func MatchPod(label, field labels.Selector) generic.Matcher { func PodToSelectableFields(pod *api.Pod) labels.Set { return labels.Set{ "name": pod.Name, - "Status.Phase": string(pod.Status.Phase), - "Status.Host": pod.Status.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 2611eaa30db..f583f68bbf4 100644 --- a/plugin/pkg/scheduler/factory/factory.go +++ b/plugin/pkg/scheduler/factory/factory.go @@ -259,7 +259,7 @@ func getHostFieldLabel(apiVersion string) string { case "v1beta1", "v1beta2": return "DesiredState.Host" default: - return "Status.Host" + return "status.host" } }