mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 04:22:13 +08:00
K8s: Fix hack/update-codegen (#91867)
This commit is contained in:
@ -7,7 +7,10 @@ package applyconfiguration
|
||||
import (
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/generated/applyconfiguration/aggregation/v0alpha1"
|
||||
internal "github.com/grafana/grafana/pkg/aggregator/generated/applyconfiguration/internal"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no
|
||||
@ -29,3 +32,7 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewTypeConverter(scheme *runtime.Scheme) *testing.TypeConverter {
|
||||
return &testing.TypeConverter{Scheme: scheme, TypeResolver: internal.Parser()}
|
||||
}
|
||||
|
Reference in New Issue
Block a user