Schema V2: Fix apiVersion for conversion to v2beta1 (#108916)

SchemaV2: Fix apiVersion for conversion to v2beta1

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
This commit is contained in:
Dominik Prokop
2025-07-30 13:38:43 +00:00
committed by GitHub
co-authored by Ivan Ortega
parent 006ea8e1b9
commit d790fdf081
5 changed files with 5 additions and 5 deletions
@@ -1,6 +1,6 @@
{
"kind": "Dashboard",
"apiVersion": "v2beta1",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "test-v2alpha1-complete",
"creationTimestamp": null,
@@ -1,6 +1,6 @@
{
"kind": "Dashboard",
"apiVersion": "v2beta1",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "test-v2alpha1-annotations",
"creationTimestamp": null
@@ -1,6 +1,6 @@
{
"kind": "Dashboard",
"apiVersion": "v2beta1",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "test-v2alpha1-groupby-adhoc-vars",
"creationTimestamp": null
@@ -1,6 +1,6 @@
{
"kind": "Dashboard",
"apiVersion": "v2beta1",
"apiVersion": "dashboard.grafana.app/v2beta1",
"metadata": {
"name": "test-v2alpha1-viz-config",
"creationTimestamp": null
@@ -39,7 +39,7 @@ import (
func ConvertDashboard_V2alpha1_to_V2beta1(in *dashv2alpha1.Dashboard, out *dashv2beta1.Dashboard, scope conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.APIVersion = dashv2beta1.VERSION
out.APIVersion = dashv2beta1.APIVERSION
out.Kind = in.Kind
return convertDashboardSpec_V2alpha1_to_V2beta1(&in.Spec, &out.Spec, scope)