Skip to content

Commit

Permalink
fix(config): solve Go compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fourstepper committed Jun 21, 2024
1 parent e943197 commit 31b96e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions internal/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
type Config struct {
MimirRuleRequeuePeriod time.Duration
AlertingBurnRates AlertingBurnRates
DefaultBaseWindow time.Duration
}

type AlertingBurnRates struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/helpers/prometheus_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ func (mrs *MonitoringRuleSet) SetupRules() ([]monitoringv1.RuleGroup, error) {
}

func CreatePrometheusRule(slo *openslov1.SLO, sli *openslov1.SLI) (*monitoringv1.PrometheusRule, error) {
cfg := config.NewConfig() // should we initialize the config once somewhere and pass it around? Do we care?
baseWindow := config.DefaultBaseWindow
cfg := config.NewConfig()
baseWindow := cfg.DefaultBaseWindow.String()
if slo.ObjectMeta.Annotations["osko.dev/baseWindow"] != "" {
baseWindow = slo.ObjectMeta.Annotations["osko.dev/baseWindow"]
}
Expand Down

0 comments on commit 31b96e7

Please sign in to comment.