diff --git a/pkg/apiserver/installer/conversion.go b/pkg/apiserver/installer/conversion.go index df8285b3..ca70e616 100644 --- a/pkg/apiserver/installer/conversion.go +++ b/pkg/apiserver/installer/conversion.go @@ -63,7 +63,12 @@ func ConvertURLValuesToV1beta2MetricListOptions(in *url.Values, out *cmv1beta2.M // RegisterConversions adds conversion functions to the given scheme. func RegisterConversions(s *runtime.Scheme) error { - return s.AddConversionFunc((*url.Values)(nil), (*cmv1beta1.MetricListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + if err := s.AddConversionFunc((*url.Values)(nil), (*cmv1beta1.MetricListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { return ConvertURLValuesToV1beta1MetricListOptions(a.(*url.Values), b.(*cmv1beta1.MetricListOptions), scope) + }); err != nil { + return err + } + return s.AddConversionFunc((*url.Values)(nil), (*cmv1beta2.MetricListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return ConvertURLValuesToV1beta2MetricListOptions(a.(*url.Values), b.(*cmv1beta2.MetricListOptions), scope) }) }