Skip to content

Commit

Permalink
Fix invalid PrometheusRule when adding grouping to a ratio indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Atkinson authored and metalmatze committed Feb 4, 2024
1 parent 83b0b8b commit 6bf8659
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kubernetes/controllers/servicelevelobjective.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ func makeConfigMap(name string, kubeObjective pyrrav1alpha1.ServiceLevelObjectiv
return nil, fmt.Errorf("failed to get generic rules: %w", err)
}
// ignore these rules
} else {
rule.Groups = append(rule.Groups, rules)
}

rule.Groups = append(rule.Groups, rules)
}

bytes, err := yaml.Marshal(rule)
Expand Down Expand Up @@ -244,9 +244,9 @@ func makePrometheusRule(kubeObjective pyrrav1alpha1.ServiceLevelObjective, gener
return nil, fmt.Errorf("failed to get generic rules: %w", err)
}
// ignore these rules
} else {
rule.Groups = append(rule.Groups, rules)
}

rule.Groups = append(rule.Groups, rules)
}

isController := true
Expand Down

0 comments on commit 6bf8659

Please sign in to comment.