fix: use new lookup for exports

(cherry picked from commit 33762d33bc)
This commit is contained in:
Mariell Hoversholm committed 2024-11-22 09:19:00 +01:00
1 parent a04421556e
commit 36f588fbef
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",