devopsprodigy / kubegraf-v2

Apache License 2.0
12 stars 5 forks source link

How to deploy v2 in Grafana 8 #1

Open lisakh opened 2 years ago

lisakh commented 2 years ago

Hello,

we upgraded Grafana to major version 8. We would lie to use kubegraf v2. After cloning the repo in Grafana plugins folder and restart, we are not able to configure any cluster.

Is it possible to deploy v2 as plugin in Grafana already or some tutorial how to do it? Is there a timeline to do the release?

Thank you

BBQigniter commented 2 years ago

in it's current state you have to build the v2 plugin on your own.

i did try it a few weeks ago and kept partially to grafana's howtos - e.g. https://grafana.com/tutorials/build-a-panel-plugin/ but unfortunately i did not document it what I really had to do :( - but as I can see from my commandline history

you have to install yarn and nodejs pull the repo get into the folder execute yarn install and yarn dev if build is successful you should have a dist folder - copy this to e.g. /var/lib/grafana/plugins/devopsprodigy-kubegrafv2-app restart grafana-server --- you might have to configure some lines in grafana.ini, so grafana allows you to use this unsigned plugin

like

[...]
[plugins]
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
allow_loading_unsigned_plugins = devopsprodigy-kubegrafv2-app,devopsprodigy-kubegrafv2-ds
[...]

hope this helps for the moment

artemdubik commented 2 years ago

Hi @BBQigniter , could you please suggest. I use "yarn dev" yarn run v1.22.17 and at the end I see 8 errors:

/root/kubegraf-v2/src/components/NamespaceCard.tsx 87:13 error Expected '!==' and instead saw '!=' eqeqeq

/root/kubegraf-v2/src/datasource/partials/KubegrafConfig.tsx 85:51 error ' can be escaped with ', ‘, ', ’ react/no-unescaped-entities 96:53 error ' can be escaped with ', ‘, ', ’ react/no-unescaped-entities

/root/kubegraf-v2/src/page/ApplicationsOverview.tsx 310:36 error Missing "key" prop for element in iterator react/jsx-key 318:33 error Missing "key" prop for element in iterator react/jsx-key

/root/kubegraf-v2/src/page/BasePage.tsx 228:50 error Expected '===' and instead saw '==' eqeqeq

/root/kubegraf-v2/src/page/ClustersList.tsx 158:20 error Missing "key" prop for element in iterator react/jsx-key

/root/kubegraf-v2/src/page/Config.tsx 70:13 error Using target="_blank" without rel="noreferrer" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener react/jsx-no-target-blank

BBQigniter commented 2 years ago

Hi, @brosseeliande,

sorry, cannot really help with this as I have no clue about the code :( and I didn't have time yet to try to build the latest source yet. Probably will have a look in the next few weeks again.