Skip to content

Commit

Permalink
Add flags for incident links
Browse files Browse the repository at this point in the history
  • Loading branch information
yacut committed Feb 27, 2021
1 parent 3b38f5e commit ce1d8f5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.2.2 / 2021-02-27

- [ENHANCEMENT] Add flags for incident links

## v1.2.1 / 2021-02-27

- [FIX] Fix the incident URLs
Expand Down
4 changes: 3 additions & 1 deletion cmd/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func parseAndValidateFlags() *config.Config {
flag.String("alarms.nodes.resources.priority", "LOW", "The node resources alarm incident priority")
flag.Int("alarms.nodes.resources.threshold", 90, "The node resources percentage threshold from 1 to 100")

flag.String("links.metrics", "", "Metrics URL for the alarm-related incident. Your can use following mustache variables here: pod_namespace, pod_name, node_name, cluster_name")
flag.String("links.logs", "", "Logs URL for the alarm-related incident. Your can use following mustache variables here: pod_namespace, pod_name, node_name, cluster_name")

pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

Expand Down Expand Up @@ -96,7 +99,6 @@ func parseAndValidateFlags() *config.Config {
}

logger.Init(cfg.Settings.Log)
log.Info().Interface("config", cfg).Msg("Global config")

ilertAPIKeyEnv := utils.GetEnv("ILERT_API_KEY", "")
if ilertAPIKeyEnv != "" {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/iLert/ilert-kube-agent
go 1.15

require (
github.com/cbroglie/mustache v1.2.0 // indirect
github.com/cbroglie/mustache v1.2.0
github.com/dustin/go-humanize v1.0.0
github.com/gin-contrib/logger v0.0.2
github.com/gin-contrib/size v0.0.0-20200916080119-37b334d93b20
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package shared

// Version current version
const Version = "v1.2.0"
const Version = "v1.2.2"

// App name
const App = "ilert-kube-agent"

0 comments on commit ce1d8f5

Please sign in to comment.