grafana / helm-charts

Apache License 2.0
1.67k stars 2.29k forks source link

How to lock grafana plugin version in helm chart #2267

Open kushalgangan opened 1 year ago

kushalgangan commented 1 year ago

We have been using grafana on-call plugin and with every restart, it updates to a new version if it's available. We have to lock it down to a specific version. Could you please suggest how we should achieve this in grafana helm chart?

Currently, we are adding an extra init container to install the plugin with a specific version using grafana-cli.

      extraInitContainers:
        - image: grafana/grafana
          imagePullPolicy: IfNotPresent
          name: grafana-plugins
          command: ['sh', '-c', "grafana-cli plugins install grafana-oncall-app v1.1.31"]
          volumeMounts:
            - mountPath: /var/lib/grafana
              name: storage
atownsend247 commented 1 year ago

I have come across this too and not worked out a way to achieve this, is there a suggested way to do this?

VenkatChowdaryK commented 1 year ago

I also faced this issue while implementing in our project, its keep on updating and we are seeing lot of compatibility issues with this. anyone faced this issue and resolved it with any approach ? thanks in advance.

lstama commented 1 year ago

We have been using grafana on-call plugin and with every restart, it updates to a new version if it's available. We have to lock it down to a specific version. Could you please suggest how we should achieve this in grafana helm chart?

Currently, we are adding an extra init container to install the plugin with a specific version using grafana-cli.

      extraInitContainers:
        - image: grafana/grafana
          imagePullPolicy: IfNotPresent
          name: grafana-plugins
          command: ['sh', '-c', "grafana-cli plugins install grafana-oncall-app v1.1.31"]
          volumeMounts:
            - mountPath: /var/lib/grafana
              name: storage

Thanks for the workaround tips, currently facing the same issue.

Edit: It doesn't work for me, got: grafana-oncall-app v1.1.31 either does not exist or is not supported on your system

Edit 2: It works if you replace v1.1.31 with vv1.1.31, grafana-cli plugins removes v* prefix but grafana-oncall-app versioning has v* as its version prefix, so I just add another v in front of it and it now works.

ak0nst commented 1 year ago

one more solution founding by me:

plugins:
  - https://grafana.com/api/plugins/grafana-oncall-app/versions/1.3.25/download;grafana-oncall-app
akashcldcvr commented 10 months ago

We have to lock it down to a specific version by updating grafana helm chart plugin as below

plugins:
 - redis-datasource
 - grafana-bigquery-datasource  
 - https://grafana.com/api/plugins/grafana-oncall-app/versions/v1.2.41/download;grafana-oncall-app

You can search the valid version of plugin using this url: https://grafana.com/api/plugins/grafana-oncall-app/versions

It work for me !

mhulscher commented 3 months ago

Just wanted to add that I recently had to pin the grafana-oracle-datasource, and I was able to do that based on the suggestions in this issue, like so:

https://grafana.com/api/plugins/grafana-oracle-datasource/versions/2.8.7/download;grafana-oracle-datasource
caviliar commented 3 weeks ago

this seems to work (adding the version you want at the end of the plugin):

    plugins:
      - grafana-athena-datasource
      - grafana-bigquery-datasource
      - grafana-opensearch-datasource 2.19.1
      - ...
lucasfcnunes commented 3 weeks ago

@caviliar does it lock the version?

vaibhhavv commented 2 weeks ago

Hi @lucasfcnunes and all others like me who want to install a grafana plugin with a particular version via helm chart, below is the syntax.

plugins:
      - grafana-image-renderer 3.10.4 
      - <PLUGIN_NAME> <VERSION>
      - ...
caviliar commented 2 weeks ago

@caviliar does it lock the version?

Yes it locks the version.

The same as @vaibhhavv mentioned.