mirror of https://github.com/k3s-io/k3s
fix issue(#47976)Invalid value error when creating service from exported config
parent
8b9f0ea5de
commit
a88e8e2158
|
@ -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