-
Notifications
You must be signed in to change notification settings - Fork 90
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
testutil/promrated: add initial basic looping and read in config #1548
Conversation
Codecov ReportBase: 54.32% // Head: 54.39% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1548 +/- ##
==========================================
+ Coverage 54.32% 54.39% +0.06%
==========================================
Files 153 153
Lines 19426 19426
==========================================
+ Hits 10554 10567 +13
+ Misses 7447 7435 -12
+ Partials 1425 1424 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
12701da
to
0d189e1
Compare
Long: `Starts a promrated server that polls rated and makes metrics available to prometheus`, | ||
Args: cobra.NoArgs, | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
return runFunc(cmd.Context(), config) |
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.
if you want to support ENV vars and config files (in addition to --flags) you'll need to export and call cmd.initializeConfig
, but adding that later when actually required is best.
Start of #1540. Per corvers suggestion taking incremental steps instead of a large code dump. This starts by reading the necessary config values, then runs on a loop every 10 mins with some logging. After this I will expose some metrics to prometheus then start some of the more complex logic for fetching clusters and polling rated.
ticket: #1540
category: misc