mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
K8s: use +enum tag in playlist and unstructured dummy (#82022)
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
genericregistry "k8s.io/apiserver/pkg/registry/generic/registry"
|
||||
"k8s.io/apiserver/pkg/registry/rest"
|
||||
|
||||
common "github.com/grafana/grafana/pkg/apis/common/v0alpha1"
|
||||
example "github.com/grafana/grafana/pkg/apis/example/v0alpha1"
|
||||
grafanarequest "github.com/grafana/grafana/pkg/services/apiserver/endpoints/request"
|
||||
grafanaregistry "github.com/grafana/grafana/pkg/services/apiserver/registry/generic"
|
||||
@@ -93,7 +94,11 @@ func (s *dummyStorage) Get(ctx context.Context, name string, options *metav1.Get
|
||||
CreationTimestamp: s.creationTimestamp,
|
||||
ResourceVersion: "1",
|
||||
},
|
||||
Spec: fmt.Sprintf("dummy: %s", name),
|
||||
Spec: common.Unstructured{
|
||||
Object: map[string]any{
|
||||
"Dummy": name,
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -112,7 +117,11 @@ func (s *dummyStorage) List(ctx context.Context, options *internalversion.ListOp
|
||||
CreationTimestamp: s.creationTimestamp,
|
||||
ResourceVersion: "1",
|
||||
},
|
||||
Spec: fmt.Sprintf("dummy: %s", name),
|
||||
Spec: common.Unstructured{
|
||||
Object: map[string]any{
|
||||
"Dummy": name,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
return res, nil
|
||||
|
||||
Reference in New Issue
Block a user