mirror of
https://github.com/grafana/grafana.git
synced 2024-11-21 16:38:03 -06:00
Plugins: Expose datasources as apiservers feature toggle (#93250)
This commit is contained in:
parent
73eff837e8
commit
f21a5987a2
@ -145,6 +145,7 @@ Experimental features might be changed or removed without prior notice.
|
||||
| `awsDatasourcesTempCredentials` | Support temporary security credentials in AWS plugins for Grafana Cloud customers |
|
||||
| `mlExpressions` | Enable support for Machine Learning in server-side expressions |
|
||||
| `metricsSummary` | Enables metrics summary queries in the Tempo data source |
|
||||
| `datasourceAPIServers` | Expose some datasources as apiservers. |
|
||||
| `permissionsFilterRemoveSubquery` | Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder |
|
||||
| `aiGeneratedDashboardChanges` | Enable AI powered features for dashboards to auto-summary changes when saving |
|
||||
| `sseGroupByDatasource` | Send query to the same datasource in a single request when using server side expressions. The `cloudWatchBatchQueries` feature toggle should be enabled if this used with CloudWatch. |
|
||||
@ -206,8 +207,8 @@ Experimental features might be changed or removed without prior notice.
|
||||
|
||||
The following toggles require explicitly setting Grafana's [app mode]({{< relref "../_index.md#app_mode" >}}) to 'development' before you can enable this feature toggle. These features tend to be experimental.
|
||||
|
||||
| Feature toggle name | Description |
|
||||
| -------------------------------------- | -------------------------------------------------------------- |
|
||||
| `grafanaAPIServerWithExperimentalAPIs` | Register experimental APIs with the k8s API server |
|
||||
| `grafanaAPIServerEnsureKubectlAccess` | Start an additional https handler and write kubectl options |
|
||||
| `panelTitleSearchInV1` | Enable searching for dashboards using panel title in search v1 |
|
||||
| Feature toggle name | Description |
|
||||
| -------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `grafanaAPIServerWithExperimentalAPIs` | Register experimental APIs with the k8s API server, including all datasources |
|
||||
| `grafanaAPIServerEnsureKubectlAccess` | Start an additional https handler and write kubectl options |
|
||||
| `panelTitleSearchInV1` | Enable searching for dashboards using panel title in search v1 |
|
||||
|
@ -87,6 +87,7 @@ export interface FeatureToggles {
|
||||
mlExpressions?: boolean;
|
||||
traceQLStreaming?: boolean;
|
||||
metricsSummary?: boolean;
|
||||
datasourceAPIServers?: boolean;
|
||||
grafanaAPIServerWithExperimentalAPIs?: boolean;
|
||||
grafanaAPIServerEnsureKubectlAccess?: boolean;
|
||||
featureToggleAdminPage?: boolean;
|
||||
|
@ -58,8 +58,11 @@ func RegisterAPIService(
|
||||
accessControl accesscontrol.AccessControl,
|
||||
reg prometheus.Registerer,
|
||||
) (*DataSourceAPIBuilder, error) {
|
||||
// We want to expose just a limited set of plugins
|
||||
explictPluginList := features.IsEnabledGlobally(featuremgmt.FlagDatasourceAPIServers)
|
||||
|
||||
// This requires devmode!
|
||||
if !features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs) {
|
||||
if !(explictPluginList || features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs)) {
|
||||
return nil, nil // skip registration unless opting into experimental apis
|
||||
}
|
||||
|
||||
@ -73,7 +76,7 @@ func RegisterAPIService(
|
||||
}
|
||||
|
||||
for _, ds := range all {
|
||||
if !slices.Contains(ids, ds.ID) {
|
||||
if explictPluginList && !slices.Contains(ids, ds.ID) {
|
||||
continue // skip this one
|
||||
}
|
||||
|
||||
|
@ -517,9 +517,16 @@ var (
|
||||
FrontendOnly: true,
|
||||
Owner: grafanaObservabilityTracesAndProfilingSquad,
|
||||
},
|
||||
{
|
||||
Name: "datasourceAPIServers",
|
||||
Description: "Expose some datasources as apiservers.",
|
||||
Stage: FeatureStageExperimental,
|
||||
Owner: grafanaAppPlatformSquad,
|
||||
RequiresRestart: true, // changes the API routing
|
||||
},
|
||||
{
|
||||
Name: "grafanaAPIServerWithExperimentalAPIs",
|
||||
Description: "Register experimental APIs with the k8s API server",
|
||||
Description: "Register experimental APIs with the k8s API server, including all datasources",
|
||||
Stage: FeatureStageExperimental,
|
||||
RequiresRestart: true,
|
||||
RequiresDevMode: true,
|
||||
|
@ -68,6 +68,7 @@ transformationsRedesign,GA,@grafana/observability-metrics,false,false,true
|
||||
mlExpressions,experimental,@grafana/alerting-squad,false,false,false
|
||||
traceQLStreaming,GA,@grafana/observability-traces-and-profiling,false,false,true
|
||||
metricsSummary,experimental,@grafana/observability-traces-and-profiling,false,false,true
|
||||
datasourceAPIServers,experimental,@grafana/grafana-app-platform-squad,false,true,false
|
||||
grafanaAPIServerWithExperimentalAPIs,experimental,@grafana/grafana-app-platform-squad,true,true,false
|
||||
grafanaAPIServerEnsureKubectlAccess,experimental,@grafana/grafana-app-platform-squad,true,true,false
|
||||
featureToggleAdminPage,experimental,@grafana/grafana-operator-experience-squad,false,true,false
|
||||
|
|
@ -283,8 +283,12 @@ const (
|
||||
// Enables metrics summary queries in the Tempo data source
|
||||
FlagMetricsSummary = "metricsSummary"
|
||||
|
||||
// FlagDatasourceAPIServers
|
||||
// Expose some datasources as apiservers.
|
||||
FlagDatasourceAPIServers = "datasourceAPIServers"
|
||||
|
||||
// FlagGrafanaAPIServerWithExperimentalAPIs
|
||||
// Register experimental APIs with the k8s API server
|
||||
// Register experimental APIs with the k8s API server, including all datasources
|
||||
FlagGrafanaAPIServerWithExperimentalAPIs = "grafanaAPIServerWithExperimentalAPIs"
|
||||
|
||||
// FlagGrafanaAPIServerEnsureKubectlAccess
|
||||
|
@ -909,6 +909,22 @@
|
||||
"expression": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "datasourceAPIServers",
|
||||
"resourceVersion": "1726731672938",
|
||||
"creationTimestamp": "2024-09-12T07:32:40Z",
|
||||
"annotations": {
|
||||
"grafana.app/updatedTimestamp": "2024-09-19 07:41:12.938146 +0000 UTC"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"description": "Expose some datasources as apiservers.",
|
||||
"stage": "experimental",
|
||||
"codeowner": "@grafana/grafana-app-platform-squad",
|
||||
"requiresRestart": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "datasourceProxyDisableRBAC",
|
||||
@ -1327,11 +1343,14 @@
|
||||
{
|
||||
"metadata": {
|
||||
"name": "grafanaAPIServerWithExperimentalAPIs",
|
||||
"resourceVersion": "1718727528075",
|
||||
"creationTimestamp": "2023-10-06T18:55:22Z"
|
||||
"resourceVersion": "1726731672938",
|
||||
"creationTimestamp": "2023-10-06T18:55:22Z",
|
||||
"annotations": {
|
||||
"grafana.app/updatedTimestamp": "2024-09-19 07:41:12.938146 +0000 UTC"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"description": "Register experimental APIs with the k8s API server",
|
||||
"description": "Register experimental APIs with the k8s API server, including all datasources",
|
||||
"stage": "experimental",
|
||||
"codeowner": "@grafana/grafana-app-platform-squad",
|
||||
"requiresDevMode": true,
|
||||
|
Loading…
Reference in New Issue
Block a user