Commit 14bdecee authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #41474 from wojtek-t/debug_decode_parameters

Automatic merge from submit-queue (batch tested with PRs 41332, 41069, 41470, 41474) Fix unnecessary conversions in parameter codec. Fix #41472 @deads2k @smarterclayton @sttts
parents a2e4d377 fb78390f
...@@ -161,11 +161,12 @@ func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.Gro ...@@ -161,11 +161,12 @@ func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.Gro
if err != nil { if err != nil {
return err return err
} }
targetGVK := targetGVKs[0] for i := range targetGVKs {
if targetGVK.GroupVersion() == from { if targetGVKs[i].GroupVersion() == from {
return c.convertor.Convert(&parameters, into, nil) return c.convertor.Convert(&parameters, into, nil)
}
} }
input, err := c.creator.New(from.WithKind(targetGVK.Kind)) input, err := c.creator.New(from.WithKind(targetGVKs[0].Kind))
if err != nil { if err != nil {
return err return err
} }
......
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