mirror of https://github.com/k3s-io/k3s
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 ```pull/6/head
commit
6b5462803e
|
@ -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: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue