-
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.
Devspace update + Cluster dashboard (#11222)
* fix chainlink config * init dashboard * bump CTF * move dashboard rows * dashboard * comments * exclude dashboard from SonarQube * common dashboard * extend opts * rg filter
- Loading branch information
Showing
10 changed files
with
505 additions
and
12 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
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.