Commit 6b546280 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #52009 from zjj2wry/export-svc

Automatic merge from submit-queue (batch tested with PRs 51824, 50476, 52451, 52009, 52237) fix issue(#47976)Invalid value error when creating service from expor… …ted config **What this PR does / why we need it**: close issue #47976 **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents 86dc5fce a88e8e21
......@@ -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 {
......
......@@ -81,7 +81,7 @@ func TestExportService(t *testing.T) {
Namespace: "bar",
},
Spec: api.ServiceSpec{
ClusterIP: "<unknown>",
ClusterIP: "",
},
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment