grafana / helm-charts

Apache License 2.0
1.67k stars 2.28k forks source link

cannot install plugins using sidecar. #2197

Open AkshayAwate opened 1 year ago

AkshayAwate commented 1 year ago

Hello , i was trying to install grafana plugins using grafana sidecar, so i enabled plugin flags in grafana values.yaml as

sidecar:
  plugins:
    enabled: true
    label: grafana_plugin
    labelValue: "1"
    resource: configmap

and created configmap with above label and label value as

apiVersion: v1
kind: ConfigMap
metadata:
  name: plugin-cm
  labels:
    grafana_plugin: "1"
data:
  plugins: satellogic-3d-globe-panel,macropower-analytics-panel

and i was able to list plugins inside sidecar container in cat /etc/grafana/provisioning/plugins/plugins as satellogic-3d-globe-panel,macropower-analytics-panel But i was not able to find the same from grafana UI:smiling_face_with_tear:. Any suggestions/help would be appreciated.

ivanfavi commented 1 year ago

Take a look on this The plugin section is on the left side of the grafana UI within configuration button.

AkshayAwate commented 1 year ago

I was able to install with plugins list, but wanna give try with sidecar. If its installed with sidecar we should be able to see that plugin as installed from UI. Any idea @ivanfavi ?

ivanfavi commented 1 year ago

Why you are using sidecar approach for it? Could you describe the benefits of it? You can set the logLevel to DEBUG and see if you catch any clue from logs.

AkshayAwate commented 1 year ago

I was just exploring the sidecar options🤔.

beasteers commented 1 year ago

In case people are wondering why, the sidecar is for plugin configuration and doesn't handle plugin installation which is why you still need to install via the values file.

the provisioning docs: https://grafana.com/docs/grafana/latest/administration/provisioning/#plugins

afaict all of the sidecars are just thin wrappers around /api/admin/provisioning/xx/reload

Why you are using sidecar approach for it? Could you describe the benefits of it?

As I see it, the benefit would be to be able to decouple the deployment of grafana from the deployment of plugins which could be useful in CI/CD deployments. But it sounds like you'd have to write your own sidecar to do something like that.

tkcontiant commented 1 month ago

The benefit, gentleman, is that you could have a Git-Ops approach and allow systems like ArgoCD to handle and sync. The current helm-chart approach is too monolithic.