-
Notifications
You must be signed in to change notification settings - Fork 23
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
added jsonnet and grafanet into confgenerator code #369
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #369 +/- ##
==========================================
- Coverage 69.23% 61.67% -7.56%
==========================================
Files 88 91 +3
Lines 5204 5939 +735
==========================================
+ Hits 3603 3663 +60
- Misses 1382 2045 +663
- Partials 219 231 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
We have the hack/generate-dashboards.sh script which is triggered by make dashboards
.
This script downloads the jsonnet
CLI and grafonnet-lib
to ./bin
So we have 2 instances of grafonnet-lib
. Can we consolidate the two?
@@ -0,0 +1,201 @@ | |||
Apache License |
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.
IIUC grafana/grafonnet-lib
contains selected files from https://github.com/grafana/grafonnet-lib
I think we should write it somewhere and include the its version
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.
Added a sentence in confGenerator.md. Note that the License is already included in the grafonnet-lib directory.
@@ -165,32 +168,39 @@ type Dashboard struct { | |||
Panels []byte | |||
} | |||
|
|||
func (cg *ConfGen) generateGrafanaJsonnet(folderName string) error { |
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.
+1 for breaking this function into smaller functions
|
As a step towards creating grafana dashboards in the Network Observability Operator, this PR adds into the confgenerator the steps of running jsonnet using the grafannet defined constructs to generate the grafana panels, accessible via a function call (instead of performing these operations externally and then reading additional files).
The grafannet files are embedded in the confgenerator code so that they will be accessible when we run this code from the operator.