From 2f47b3ed11a3d75df3c91051d3bcacfe896a5dbc Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Fri, 10 Jul 2015 15:13:43 -0700 Subject: [PATCH 1/2] add spec.host as a synonym for spec.nodeName in v1 --- pkg/api/v1/conversion.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/api/v1/conversion.go b/pkg/api/v1/conversion.go index 9463edc4421..7b82324ec43 100644 --- a/pkg/api/v1/conversion.go +++ b/pkg/api/v1/conversion.go @@ -44,6 +44,9 @@ func addConversionFuncs() { "status.phase", "spec.nodeName": return label, value, nil + // This is for backwards compatability with old v1 clients which send spec.host + case "spec.host": + return "spec.nodeName", value, nil default: return "", "", fmt.Errorf("field label not supported: %s", label) } From 6ea0c2b3b72ec6064e35ba78f04fa6d22fffe429 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Fri, 10 Jul 2015 17:01:28 -0700 Subject: [PATCH 2/2] Fix gofmt from #11084 (cherry picked from commit 63c73a58a5700da9abeb68dbd0f8001fd0ebfd1c) --- pkg/api/v1/conversion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/v1/conversion.go b/pkg/api/v1/conversion.go index 7b82324ec43..7f4863ae520 100644 --- a/pkg/api/v1/conversion.go +++ b/pkg/api/v1/conversion.go @@ -44,7 +44,7 @@ func addConversionFuncs() { "status.phase", "spec.nodeName": return label, value, nil - // This is for backwards compatability with old v1 clients which send spec.host + // This is for backwards compatability with old v1 clients which send spec.host case "spec.host": return "spec.nodeName", value, nil default: