fix issue(#47976)Invalid value error when creating service from exported config

pull/6/head
zhengjiajin 2017-09-06 18:10:19 +08:00
parent 8b9f0ea5de
commit a88e8e2158
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ func (svcStrategy) Export(ctx genericapirequest.Context, obj runtime.Object, exa
return nil
}
if t.Spec.ClusterIP != api.ClusterIPNone {
t.Spec.ClusterIP = "<unknown>"
t.Spec.ClusterIP = ""
}
if t.Spec.Type == api.ServiceTypeNodePort {
for i := range t.Spec.Ports {

View File

@ -81,7 +81,7 @@ func TestExportService(t *testing.T) {
Namespace: "bar",
},
Spec: api.ServiceSpec{
ClusterIP: "<unknown>",
ClusterIP: "",
},
},
},