grafana/pkg/services/grafana-apiserver
2023-10-27 16:39:27 -04:00
..
auth/authorizer K8s/Authorizer: Move allow from fallback to org_role (#77235) 2023-10-26 20:46:45 +03:00
endpoints/request K8s: Move the namespace mapper to the same package that resolves them (#77101) 2023-10-25 14:13:46 -04:00
registry/generic K8s: Add storage dual writer (#75403) 2023-09-26 17:15:15 -04:00
rest K8s: Add storage dual writer (#75403) 2023-09-26 17:15:15 -04:00
storage/file K8s: JSON file storage (#75759) 2023-10-27 16:39:27 -04:00
utils K8s: Add explicit table converter (#77098) 2023-10-25 09:00:20 -07:00
common.go K8s: Add example api service (#75911) 2023-10-06 21:55:22 +03:00
config_test.go K8s: JSON file storage (#75759) 2023-10-27 16:39:27 -04:00
config.go K8s: JSON file storage (#75759) 2023-10-27 16:39:27 -04:00
log.go K8s: Remove duplicate listener in production (#76583) 2023-10-23 21:42:10 +03:00
openapi.go K8s: Register apiserver as background service, and list real playlists (#75338) 2023-09-25 15:31:58 -07:00
README.md K8s: JSON file storage (#75759) 2023-10-27 16:39:27 -04:00
request_handler.go K8s: Add example api service (#75911) 2023-10-06 21:55:22 +03:00
service.go K8s: JSON file storage (#75759) 2023-10-27 16:39:27 -04:00
wireset.go K8s: Add org ID and role authorizers (#75701) 2023-09-28 18:28:58 -04:00

Grafana Kubernetes compatible API Server

Basic Setup

app_mode = development

[feature_toggles]
grafanaAPIServer = true
kubernetesPlaylists = true

Start Grafana:

make run

Enable dual write to etcd

Start etcd:

make devenv sources=etcd

Set storage type and etcd server address in custom.ini:

[grafana-apiserver]
storage_type = etcd
etcd_servers = 127.0.0.1:2379

Enable dual write to JSON files:

Set storage type:

[grafana-apiserver]
storage_type = file

Objects will be written to disk under the {data.path}/grafana-apiserver/ directory.

For example:

data/grafana-apiserver
├── grafana.kubeconfig
└── playlist.grafana.app
    └── playlists
        └── default
            └── hi.json

kubectl access

From the root of the Grafanaa repository, run the following:

export KUBECONFIG=$PWD/data/grafana-apiserver/grafana.kubeconfig
kubectl api-resources

Grafana API Access

The Kubernetes compatible API can be accessed using existing Grafana AuthN at: http://localhost:3000/apis.