-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Devspace update + Cluster dashboard #11222
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
062082f
fix chainlink config
skudasov b6afe51
init dashboard
skudasov b20f6bf
bump CTF
skudasov b3e8e70
move dashboard rows
skudasov 889b42b
dashboard
skudasov 294c8d0
Merge branch 'develop' into devspace-update
skudasov a3d3277
comments
skudasov 1efed0a
exclude dashboard from SonarQube
skudasov 66b9de4
common dashboard
skudasov bf48729
extend opts
skudasov d53044f
rg filter
skudasov bc2b6c7
Merge branch 'develop' into devspace-update
skudasov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
42 changes: 42 additions & 0 deletions
42
charts/chainlink-cluster/dashboard/cmd/dashboard_deploy.go
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/smartcontractkit/chainlink/v2/dashboard/dashboard" | ||
) | ||
|
||
func main() { | ||
name := os.Getenv("DASHBOARD_NAME") | ||
if name == "" { | ||
panic("DASHBOARD_NAME must be provided") | ||
} | ||
ldsn := os.Getenv("LOKI_DATA_SOURCE_NAME") | ||
if ldsn == "" { | ||
panic("DATA_SOURCE_NAME must be provided") | ||
} | ||
pdsn := os.Getenv("PROMETHEUS_DATA_SOURCE_NAME") | ||
if ldsn == "" { | ||
panic("DATA_SOURCE_NAME must be provided") | ||
} | ||
dbf := os.Getenv("DASHBOARD_FOLDER") | ||
if dbf == "" { | ||
panic("DASHBOARD_FOLDER must be provided") | ||
} | ||
grafanaURL := os.Getenv("GRAFANA_URL") | ||
if grafanaURL == "" { | ||
panic("GRAFANA_URL must be provided") | ||
} | ||
grafanaToken := os.Getenv("GRAFANA_TOKEN") | ||
if grafanaToken == "" { | ||
panic("GRAFANA_TOKEN must be provided") | ||
} | ||
// if you'll use this dashboard base in other projects, you can add your own opts here to extend it | ||
db, err := dashboard.NewCLClusterDashboard(name, ldsn, pdsn, dbf, grafanaURL, grafanaToken, nil) | ||
if err != nil { | ||
panic(err) | ||
} | ||
if err := db.Deploy(); err != nil { | ||
panic(err) | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nit: Maybe use a fatal log or something instead? I'm not a huge fan of using panics this way, as it has a confusing layout for errors like this.