-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve skip metrics logs when running the operator locally in order …
…to make clear the information (#2190) * fix: metrics errors msg when run locally * centralize the logic to add metrics in the scaffold file main.go in a new func addMetrics and then, check if is running locally in the first func called. If yes, just log the proper info and ignore the rest of the calls. It will log now skip service metrics log info instead of: ... {"level":"info","ts":1573667590.2471445,"logger":"cmd","msg":"Could not generate and serve custom resource metrics","error":"operator run mode forced to local"} {"level":"info","ts":1573667590.448851,"logger":"cmd","msg":"Could not create metrics Service","error":"failed to initialize service object for metrics: OPERATOR_NAME must be set"} {"level":"info","ts":1573667590.6498501,"logger":"cmd","msg":"Could not create ServiceMonitor object","error":"no ServiceMonitor registered with the API"} {"level":"info","ts":1573667590.6498818,"logger":"cmd","msg":"Install prometheus-operator in your cluster to create ServiceMonitor objects","error":"no ServiceMonitor registered with the API"} ...
- Loading branch information
1 parent
43cf58d
commit 81c6c8a
Showing
3 changed files
with
56 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters