Skip to content
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

feat: add grafana plugin and dashboards #65

Merged
merged 4 commits into from
May 9, 2023

Conversation

arbreezy
Copy link
Member

@arbreezy arbreezy commented May 7, 2023

Closes #

📑 Description

This PR introduces grafana dashboards for metrics coming from controller runtime and the custom prometheus metric to measure reconciliation errors.

I believe atm this metric is already implemented out of the box by controller_runtime_reconcile_errors_total but if we introduce more controllers in the future might be useful. Eager to get your feedback on that !

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

This PR is using the kubebuilder's grafana plugin.
I am also attaching screenshots of Grafana dashboards.
Screenshot from 2023-05-07 20-52-06
Screenshot from 2023-05-07 20-52-42
Screenshot from 2023-05-07 20-53-05

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
@arbreezy arbreezy requested review from a team as code owners May 7, 2023 18:00
@AlexsJones
Copy link
Member

How do we deploy this into the cluster?

Aris Boutselis and others added 2 commits May 9, 2023 16:49
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
@arbreezy
Copy link
Member Author

arbreezy commented May 9, 2023

that's a good question, I think there are three options which are not mutually exclusive.

  1. We just provide the json dashboard files and let user copy/paste them unto their Grafana envs
  2. Upload the dashboards to grafana.com
  3. Create configmaps with these json files e.g
    e.g
apiVersion: v1
kind: ConfigMap
metadata:
  name: grafana-dashboards
data:
  k8sgpt.json: |
{{ .Files.Get "grafana/custom-dashboard.json" | indent 4 }}  

The only issue I have with 3. is the various different Grafana implementations ( different storage backend) where this configmap could be unused if deployed. I guess we can enable/disable it in the helm chart.

Finally kubebuilder gafana plugin helps us bootstrap the dashboards and grafana directory can be the source of truth.

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
@AlexsJones AlexsJones merged commit c3059bc into k8sgpt-ai:main May 9, 2023
@arbreezy arbreezy deleted the feat/grafana-dash branch May 11, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants