-
Notifications
You must be signed in to change notification settings - Fork 446
docs: document JaaS example #2370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
|
Fixed missing newline at end of files |
theSuess
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! I left some minor comments but overall this looks godd!
|
|
||
| ### Jsonnet | ||
|
|
||
| The Jsonnet dashboard type is deprecated. It uses the old and now unmaintained [grafonnet-lib](https://github.com/grafana/grafonnet-lib) library. Users who rely on Jsonnet based dashboards should switch to [JaaS](#jaas) instead which supports the new [grafonnet](https://github.com/grafana/grafonnet) library as well as any additional custom libraries you have created yourself. See the [discussion](https://github.com/grafana/grafana-operator/discussions/2171) for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The Jsonnet dashboard type is deprecated. It uses the old and now unmaintained [grafonnet-lib](https://github.com/grafana/grafonnet-lib) library. Users who rely on Jsonnet based dashboards should switch to [JaaS](#jaas) instead which supports the new [grafonnet](https://github.com/grafana/grafonnet) library as well as any additional custom libraries you have created yourself. See the [discussion](https://github.com/grafana/grafana-operator/discussions/2171) for more details. | |
| The Jsonnet dashboard type is targeted for deprecation. It uses the old and now unmaintained [grafonnet-lib](https://github.com/grafana/grafonnet-lib) library. Users who rely on Jsonnet based dashboards are encouraged to evaulaute the jsonnet expressions beforehand (using tooling like [tanka](https://tanka.dev) or [kubecfg](https://github.com/kubecfg/kubecfg)) or switch to [Jsonnet-as-a-Service](#jaas) instead which supports the new [grafonnet](https://github.com/grafana/grafonnet) library as well as any additional custom libraries you have created yourself. See the [discussion](https://github.com/grafana/grafana-operator/discussions/2171) for more details. |
| url: "http://jaas.jaas.svc.cluster.local:8080/jsonnet/your-dashboard" | ||
| ``` | ||
|
|
||
| [Example documentation](./jaas/readme). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| [Example documentation](./jaas/readme). | |
| [Full example, including JaaS setup](./jaas/readme). |
|
|
||
| ## Write your dashboards | ||
|
|
||
| The JaaS Helm chart includes [Grafonnet](https://github.com/grafana/grafonnet) and [other required libraries](https://github.com/metio/jsonnet-oci-images) as OCI volumes to write Grafana dashboards using Jsonnet. However, since Jsonnet is a superset of JSON, you can use JaaS to deliver your JSON based dashboards as well. This allows you to export an existing dashboard using the Grafana UI, package it as an OCI object, and expose it through JaaS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The JaaS Helm chart includes [Grafonnet](https://github.com/grafana/grafonnet) and [other required libraries](https://github.com/metio/jsonnet-oci-images) as OCI volumes to write Grafana dashboards using Jsonnet. However, since Jsonnet is a superset of JSON, you can use JaaS to deliver your JSON based dashboards as well. This allows you to export an existing dashboard using the Grafana UI, package it as an OCI object, and expose it through JaaS. | |
| The JaaS Helm chart includes [Grafonnet](https://github.com/grafana/grafonnet) and [other required libraries](https://github.com/metio/jsonnet-oci-images) as OCI volumes to write Grafana dashboards using Jsonnet. |
Not sure if this is relevant
|
|
||
| When using Jsonnet to define your dashboards, you will most likely want to use Grafonnet which is exposed like this in JaaS: | ||
|
|
||
| {{< readfile file="imports.jsonnet" code="true" lang="jsonnet" >}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this file is pretty short and not useful on its own, this should be an inline codeblock instead.
|
|
||
| {{< readfile file="dashboard.yaml" code="true" lang="yaml" >}} | ||
|
|
||
| The name `your-dashboard` must match of the snippets you added to JaaS, or otherwise you will get a 404 response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The name `your-dashboard` must match of the snippets you added to JaaS, or otherwise you will get a 404 response. | |
| The name `your-dashboard` must match one of the snippets you added to JaaS. |
This adds documentation on how to use JaaS as discussed in #2171.