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 ability to provide JSONnet project libraries to runtime inside operator #1212

Merged

Conversation

olejeglejeg
Copy link
Contributor

@olejeglejeg olejeglejeg commented Aug 25, 2023

Relates to #1175

@hubeadmin
Copy link
Collaborator

Thanks for the PR! I intend to take a look at this later on today!

Copy link
Collaborator

@NissesSenap NissesSenap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will also try to take a look later. I added a few small comments for starters.

Comment on lines 46 to 50
cpu: 200m
memory: 100Mi
cpu: 1
memory: 1024Mi
requests:
cpu: 100m
memory: 20Mi
memory: 100Mi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the resources are way too much, but let's change that in a separate PR for traceability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, totally agree. This trick was needed for testing the generation of our dashboard. It seems that new version of grafonnet is more resources giddy than previous

Comment on lines 378 to 383
Because of the flexibility, simplicity and extendability of JSONnet it's one of the best choices fitting to the currently modern approach "something as a code", dashboards as a code in our case.
In this picture of the world, Grafana operator acts as a bridge between the DaC and Grafana resource that helps developers to absorb the logic of how dashboards deliver to target and helps to separate the responsibility between SEs who must have full ownership of their code and provide observability of it, and Infra, DevOps and SRE teams that empower developers by platforms and a broad variety of tooling to do it.

Extendability is the part that currently was missed and wasn't supported by the operator from the box, because of the lack of ability to provide external or self-developed internal libsonnet libraries that are required for building of desired dashboard inside of operator.

To cover that advanced scenario, we've added the ability to provide your JSONnet project with all runtime-required libs to the operator and build it during runtime inside.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text is a bit like a "blog post", I'm looking forward to a blog around this. But if it could be rewritten to just focus on the feature itself.

@hubeadmin
Copy link
Collaborator

started reviewing, i'll finish it first thing in the morning tomorrow! Looks great so far!

@hubeadmin
Copy link
Collaborator

General comment, can we have a user-deployable example in /examples? I appreciate the unit and e2e tests!
This would serve more as an example for users to be able to quickly understand how to work with jsonnet and grafana-operator

Copy link
Collaborator

@hubeadmin hubeadmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I really like the attention you put into this, especially around collision prevention and testing! Thank you!

I'll approve once my comment above is addressed, happy to merge after that!

@olejeglejeg
Copy link
Contributor Author

General comment, can we have a user-deployable example in /examples? I appreciate the unit and e2e tests! This would serve more as an example for users to be able to quickly understand how to work with jsonnet and grafana-operator

@HubertStefanski Yes, I'll try to add it today. Do you have suggestion or opinion about the content?

@hubeadmin
Copy link
Collaborator

Yes, I'll try to add it today. Do you have suggestion or opinion about the content?

Not really, as long as the example is easy to understand and deploy, I think that's enough for a user coming from a Google search to try it out. Doesn't need to be anything fancy, just a simple setup for jsonnet dashboards

@hubeadmin
Copy link
Collaborator

@olejeglejeg , just those few EOF errors to fix in your new examples, and I'll approve!

@hubeadmin hubeadmin merged commit 88da91b into grafana:master Aug 29, 2023
9 checks passed
@olejeglejeg olejeglejeg deleted the passsing-whole-jsonnet-project-to-dashboard branch August 29, 2023 12:35
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.

3 participants