-
Notifications
You must be signed in to change notification settings - Fork 11.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage: Unified Storage based on Entity API #71977
Conversation
f2afae2
to
6c2d46e
Compare
e0ce901
to
78313e6
Compare
78313e6
to
aca9833
Compare
163886b
to
dea4d20
Compare
7d2cd5e
to
184df86
Compare
e937d2b
to
27efbc4
Compare
ce37f9a
to
06ccd14
Compare
b6946a1
to
089935b
Compare
089935b
to
73e28f4
Compare
bcc6159
to
346ac78
Compare
* remove extra user abstraction * add test stub (but
* make test work, need to resolve expected differences * remove the fields not supported by legacy * sanitize out the bits legacy does not support * sanitize out the bits legacy does not support --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
20e0819
to
1ea5861
Compare
@@ -47,7 +47,7 @@ func newConfig(cfg *setting.Cfg, features featuremgmt.FeatureToggles) *config { | |||
|
|||
return &config{ | |||
enabled: features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServer), | |||
devMode: cfg.Env == setting.Dev, | |||
devMode: features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerEnsureKubectlAccess), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toddtreece @grafana/grafana-app-platform-squad -- this changes the behavior for when we auto-start the extra kubectl port.
This now requires a feature flag (and dev mode) rather than just dev mode. This change was required to simplify the integration test setup, but I think is generally better anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the README
probably also needs to be updated with this info for kubectl access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call -- updated
@@ -222,10 +222,11 @@ var ( | |||
Created: time.Date(2022, time.September, 27, 12, 0, 0, 0, time.UTC), | |||
}, | |||
{ | |||
Name: "entityStore", | |||
Description: "SQL-based entity store (requires storage flag also)", | |||
Name: "unifiedStorage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanCech -- i renamed this while we are here futzing with feature flags. In general we will want to clear all reference to "entity" but after merging :)
This PR explores running entity api against a separate dedicated database, and the changes needed to support alternative databases beyond sqlite/mysql/postgres.
It requires some configuration to be able to exercise it:
With this configuration, you can run everything in-process with:
The default kubeconfig sends requests directly to the apiserver, to authenticate as a grafana user, create
grafana.kubeconfig
:Where
<username>
and<password>
are credentials for basic auth against Grafana.In this mode, you can interact with the k8s api via:
To create a playlist, create a file
playlist-generate.yaml
:then run:
To run with a separate storage api using grpc, first update
conf/custom.ini
and set:Start the storage-apiserver with:
Then in another session start the grafana server:
Finally, you can list the previously-created playlists with: