Skip to content

Commit

Permalink
Merge pull request grafana#666 from yardenshoham/fix-issue-434
Browse files Browse the repository at this point in the history
Add Instana datasource
  • Loading branch information
pb82 authored Jan 25, 2022
2 parents e9270c3 + fc67d8e commit d8b664a
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 10 deletions.
13 changes: 10 additions & 3 deletions api/integreatly/v1alpha1/grafanadatasource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ type GrafanaDataSourceJsonData struct {
MaxOpenConns int `json:"maxOpenConns,omitempty"`
MaxIdleConns int `json:"maxIdleConns,omitempty"`
ConnMaxLifetime int `json:"connMaxLifetime,omitempty"`
// Useful fields for clickhouse datasource
// See https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning
// See https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44
// Useful fields for clickhouse datasource
// See https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning
// See https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44
AddCorsHeader bool `json:"addCorsHeader,omitempty"`
DefaultDatabase string `json:"defaultDatabase,omitempty"`
UsePOST bool `json:"usePOST,omitempty"`
Expand Down Expand Up @@ -172,6 +172,13 @@ type GrafanaDataSourceJsonData struct {
SigV4AssumeRoleArn string `json:"sigV4AssumeRoleArn,omitempty"`
SigV4Region string `json:"sigV4Region,omitempty"`
SigV4Profile string `json:"sigV4Profile,omitempty"`
// Fields for Instana data sources
// See https://github.com/instana/instana-grafana-datasource/blob/main/provisioning/datasources/datasource.yml
Url string `json:"url,omitempty"`
ApiToken string `json:"apiToken,omitempty"`
UseProxy bool `json:"useProxy,omitempty"`
ShowOffline bool `json:"showOffline,omitempty"`
AllowInfraExplore bool `json:"allowInfraExplore,omitempty"`
}

type GrafanaDataSourceJsonDerivedFields struct {
Expand Down
17 changes: 14 additions & 3 deletions config/crd/bases/integreatly.org_grafanadatasources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ spec:
json options See https://grafana.com/docs/administration/provisioning/#datasources
properties:
addCorsHeader:
description: ' Useful fields for clickhouse datasource See
https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning See
https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44'
description: Useful fields for clickhouse datasource See
https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning
See https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44
type: boolean
allowInfraExplore:
type: boolean
apiToken:
type: string
appInsightsAppId:
description: Fields for Azure data sources
type: string
Expand Down Expand Up @@ -172,6 +176,8 @@ spec:
type: string
postgresVersion:
type: integer
showOffline:
type: boolean
sigV4AssumeRoleArn:
type: string
sigV4Auth:
Expand Down Expand Up @@ -224,8 +230,13 @@ spec:
type: string
tsdbVersion:
type: string
url:
description: Fields for Instana data sources See https://github.com/instana/instana-grafana-datasource/blob/main/provisioning/datasources/datasource.yml
type: string
usePOST:
type: boolean
useProxy:
type: boolean
useYandexCloudAuthorization:
type: boolean
version:
Expand Down
18 changes: 18 additions & 0 deletions deploy/examples/datasources/Instana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: integreatly.org/v1alpha1
kind: GrafanaDataSource
metadata:
name: example-instana-datasource
spec:
name: example-instana
datasources:
- name: Instana
type: instana-datasource
access: direct
editable: false
url: INSTANA_UI_BACKEND_URL
jsonData:
url: INSTANA_UI_BACKEND_URL
apiToken: INSTANA_API_TOKEN
useProxy: false
showOffline: true
allowInfraExplore: true
17 changes: 14 additions & 3 deletions deploy/manifests/latest/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,14 @@ spec:
json options See https://grafana.com/docs/administration/provisioning/#datasources
properties:
addCorsHeader:
description: ' Useful fields for clickhouse datasource See
https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning See
https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44'
description: Useful fields for clickhouse datasource See
https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning
See https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44
type: boolean
allowInfraExplore:
type: boolean
apiToken:
type: string
appInsightsAppId:
description: Fields for Azure data sources
type: string
Expand Down Expand Up @@ -280,6 +284,8 @@ spec:
type: string
postgresVersion:
type: integer
showOffline:
type: boolean
sigV4AssumeRoleArn:
type: string
sigV4Auth:
Expand Down Expand Up @@ -332,8 +338,13 @@ spec:
type: string
tsdbVersion:
type: string
url:
description: Fields for Instana data sources See https://github.com/instana/instana-grafana-datasource/blob/main/provisioning/datasources/datasource.yml
type: string
usePOST:
type: boolean
useProxy:
type: boolean
useYandexCloudAuthorization:
type: boolean
version:
Expand Down
37 changes: 36 additions & 1 deletion documentation/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,21 @@ GrafanaDataSourceJsonData contains the most common json options See https://graf
<td><b>addCorsHeader</b></td>
<td>boolean</td>
<td>
Useful fields for clickhouse datasource See https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning See https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44<br/>
Useful fields for clickhouse datasource See https://github.com/Vertamedia/clickhouse-grafana/tree/master/dist/README.md#configure-the-datasource-with-provisioning See https://github.com/Vertamedia/clickhouse-grafana/tree/master/src/datasource.ts#L44<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>allowInfraExplore</b></td>
<td>boolean</td>
<td>
<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>apiToken</b></td>
<td>string</td>
<td>
<br/>
</td>
<td>false</td>
</tr><tr>
Expand Down Expand Up @@ -870,6 +884,13 @@ GrafanaDataSourceJsonData contains the most common json options See https://graf
<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>showOffline</b></td>
<td>boolean</td>
<td>
<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>sigV4AssumeRoleArn</b></td>
<td>string</td>
Expand Down Expand Up @@ -1003,13 +1024,27 @@ GrafanaDataSourceJsonData contains the most common json options See https://graf
<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>url</b></td>
<td>string</td>
<td>
Fields for Instana data sources See https://github.com/instana/instana-grafana-datasource/blob/main/provisioning/datasources/datasource.yml<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>usePOST</b></td>
<td>boolean</td>
<td>
<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>useProxy</b></td>
<td>boolean</td>
<td>
<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>useYandexCloudAuthorization</b></td>
<td>boolean</td>
Expand Down

0 comments on commit d8b664a

Please sign in to comment.