K8s/Folders: Rename api group to singular (#81443)

This commit is contained in:
Ryan McKinley
2024-01-30 08:50:37 -08:00
committed by GitHub
parent d26959aafe
commit e041055012
18 changed files with 169 additions and 148 deletions
@@ -17,7 +17,6 @@ func TestFoldersApp(t *testing.T) {
}
helper := apis.NewK8sTestHelper(t, testinfra.GrafanaOpts{
AppModeProduction: false, // required for experimental APIs
DisableAnonymous: true,
EnableFeatureToggles: []string{
featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs, // Required to start the example service
},
@@ -25,7 +24,7 @@ func TestFoldersApp(t *testing.T) {
t.Run("Check discovery client", func(t *testing.T) {
disco := helper.NewDiscoveryClient()
resources, err := disco.ServerResourcesForGroupVersion("folders.grafana.app/v0alpha1")
resources, err := disco.ServerResourcesForGroupVersion("folder.grafana.app/v0alpha1")
require.NoError(t, err)
v1Disco, err := json.MarshalIndent(resources, "", " ")
@@ -35,7 +34,7 @@ func TestFoldersApp(t *testing.T) {
require.JSONEq(t, `{
"kind": "APIResourceList",
"apiVersion": "v1",
"groupVersion": "folders.grafana.app/v0alpha1",
"groupVersion": "folder.grafana.app/v0alpha1",
"resources": [
{
"name": "folders",
@@ -55,7 +54,7 @@ func TestFoldersApp(t *testing.T) {
"name": "folders/children",
"singularName": "",
"namespaced": true,
"kind": "FolderInfo",
"kind": "FolderInfoList",
"verbs": [
"get"
]
@@ -64,7 +63,7 @@ func TestFoldersApp(t *testing.T) {
"name": "folders/parents",
"singularName": "",
"namespaced": true,
"kind": "FolderInfo",
"kind": "FolderInfoList",
"verbs": [
"get"
]
@@ -1,4 +1,4 @@
apiVersion: folders.grafana.app/v0alpha1
apiVersion: folder.grafana.app/v0alpha1
kind: Folder
metadata:
generateName: x # anything is ok here... except yes or true -- they become boolean!