K8s/Dashboard: Promote from alpha1 to beta1 (#104009)

This commit is contained in:
Ryan McKinley
2025-04-23 20:54:35 +03:00
committed by GitHub
parent a6866176cd
commit b09d79b21c
84 changed files with 532 additions and 517 deletions
+10 -7
View File
@@ -7,6 +7,7 @@ import (
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/runtime/schema"
dashboardV1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1"
"github.com/grafana/grafana/pkg/registry/apis/provisioning/resources"
)
@@ -24,22 +25,24 @@ func TestIntegrationProvisioning_Client(t *testing.T) {
t.Run("dashboard client support", func(t *testing.T) {
_, _, err := clients.ForResource(schema.GroupVersionResource{
Group: "dashboard.grafana.app",
Group: dashboardV1.GROUP,
Version: dashboardV1.VERSION,
Resource: "dashboards",
Version: "v1alpha1",
})
require.NoError(t, err)
// With empty version, we should get the preferred version (v1alpha1)
_, _, err = clients.ForResource(schema.GroupVersionResource{
Group: "dashboard.grafana.app",
// With empty version, we should get the preferred version (v1beta1)
_, gvk, err := clients.ForResource(schema.GroupVersionResource{
Group: dashboardV1.GROUP,
Resource: "dashboards",
})
require.NoError(t, err)
require.Equal(t, dashboardV1.VERSION, gvk.Version)
require.Equal(t, "Dashboard", gvk.Kind)
_, _, err = clients.ForKind(schema.GroupVersionKind{
Group: "dashboard.grafana.app",
Version: "v1alpha1",
Group: dashboardV1.GROUP,
Version: dashboardV1.VERSION,
Kind: "Dashboard",
})
require.NoError(t, err)