fix: use new lookup for exports

This commit is contained in:
Mariell Hoversholm committed 2024-11-21 16:01:08 +01:00
1 parent ed0db3d0e0
commit 33762d33bc
1 file changed
+3 -2
+3 -2
View File
@@ -77,7 +77,8 @@ func (c *exportConnector) Connect(
return
}
dashboardGVR, ok := c.client.GVR(ns, schema.GroupVersionKind{
lookup := newKindsLookup(client)
dashboardGVR, ok := lookup.Resource(schema.GroupVersionKind{
Group: "dashboard.grafana.app",
Version: "v2alpha1",
Kind: "Dashboard",
@@ -88,7 +89,7 @@ func (c *exportConnector) Connect(
}
dashboardIface := client.Resource(dashboardGVR).Namespace(ns)
folderGVR, ok := c.client.GVR(ns, schema.GroupVersionKind{
folderGVR, ok := lookup.Resource(schema.GroupVersionKind{
Group: "folder.grafana.app",
Version: "v0alpha1",
Kind: "Folder",