Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoBraveCoding committed Feb 4, 2025
1 parent b6fea18 commit f1f7950
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions operator/internal/manifests/openshift/alertingrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import (
func AlertingRuleTenantLabels(ar *lokiv1.AlertingRule) {
switch ar.Spec.TenantID {
case tenantApplication:
appendAlertingRuleLabels(ar, map[string]string{
opaDefaultLabelMatchers: ar.Namespace,
labels := map[string]string{
ocpMonitoringGroupByLabel: ar.Namespace,
}
labelMatchers := strings.Split(opaDefaultLabelMatchers, ",")
Expand Down
5 changes: 3 additions & 2 deletions operator/internal/manifests/openshift/alertingrule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ func TestAlertingRuleTenantLabels(t *testing.T) {
{
Alert: "alert",
Labels: map[string]string{
opaDefaultLabelMatchers: "test-ns",
ocpMonitoringGroupByLabel: "test-ns",
"kubernetes_namespace_name": "test-ns",
"k8s_namespace_name": "test-ns",
ocpMonitoringGroupByLabel: "test-ns",
},
},
},
Expand Down
3 changes: 1 addition & 2 deletions operator/internal/manifests/openshift/recordingrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import (
func RecordingRuleTenantLabels(r *lokiv1.RecordingRule) {
switch r.Spec.TenantID {
case tenantApplication:
appendRecordingRuleLabels(r, map[string]string{
opaDefaultLabelMatchers: r.Namespace,
labels := map[string]string{
ocpMonitoringGroupByLabel: r.Namespace,
}
labelMatchers := strings.Split(opaDefaultLabelMatchers, ",")
Expand Down
5 changes: 3 additions & 2 deletions operator/internal/manifests/openshift/recordingrule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ func TestRecordingRuleTenantLabels(t *testing.T) {
{
Record: "record",
Labels: map[string]string{
opaDefaultLabelMatchers: "test-ns",
ocpMonitoringGroupByLabel: "test-ns",
"kubernetes_namespace_name": "test-ns",
"k8s_namespace_name": "test-ns",
ocpMonitoringGroupByLabel: "test-ns",
},
},
},
Expand Down

0 comments on commit f1f7950

Please sign in to comment.