Allow modifiying runbook URL on build time
Change the runbookUrlTemplate constant to be a variable.
It's now possible to override its value on build time; e.g.
```
go build -ldflags "-X github.com/kubevirt/hyperconverged-cluster-operator/controllers/operands.runbookUrlTemplate=http://something-else/%s/suffix"
```
@@ -28,7 +28,6 @@ const (
alertRuleGroup = "kubevirt.hyperconverged.rules"
outOfBandUpdateAlert = "KubevirtHyperconvergedClusterOperatorCRModification"
unsafeModificationAlert = "KubevirtHyperconvergedClusterOperatorUSModification"
- runbookUrlTemplate = "https://kubevirt.io/monitoring/runbooks/%s"
severityAlertLabelKey = "severity"
partOfAlertLabelKey = "kubernetes_operator_part_of"
partOfAlertLabelValue = "kubevirt"
@@ -37,6 +36,8 @@ const (
)
var (
+ runbookUrlTemplate = "https://kubevirt.io/monitoring/runbooks/%s"
+
outOfBandUpdateRunbookUrl = fmt.Sprintf(runbookUrlTemplate, outOfBandUpdateAlert)
unsafeModificationRunbookUrl = fmt.Sprintf(runbookUrlTemplate, unsafeModificationAlert)
)
