diff --git a/CHANGELOG.md b/CHANGELOG.md index 81cbe60..330669c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/cmd/flag.go b/cmd/flag.go index c87349c..2747f37 100644 --- a/cmd/flag.go +++ b/cmd/flag.go @@ -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() @@ -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 != "" { diff --git a/go.mod b/go.mod index 3d8a2a7..ad795b4 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/version.go b/version.go index 7b78620..df2f565 100644 --- a/version.go +++ b/version.go @@ -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"