Skip to content

Commit

Permalink
Remove label protection when removing old metrics objects
Browse files Browse the repository at this point in the history
Signed-off-by: João Vilaça <jvilaca@redhat.com>
  • Loading branch information
machadovilaca committed May 13, 2022
1 parent e0888d5 commit e0cadb4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion controllers/hyperconverged/hyperconverged_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ func (r ReconcileHyperConverged) removeOldMetricsObjs(req *common.HcoRequest) er
initOldMetricsObjects(req)

for name, object := range oldMetricsObjects {
removed, err := r.deleteObj(req, object, true)
removed, err := r.deleteObj(req, object, false)

if err != nil {
return err
Expand Down
9 changes: 0 additions & 9 deletions controllers/hyperconverged/hyperconverged_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1956,18 +1956,12 @@ var _ = Describe("HyperconvergedController", func() {
ObjectMeta: metav1.ObjectMeta{
Name: operatorMetrics,
Namespace: namespace,
Labels: map[string]string{
hcoutil.AppLabel: expected.hco.Name,
},
},
},
&corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: webhookMetrics,
Namespace: namespace,
Labels: map[string]string{
hcoutil.AppLabel: expected.hco.Name,
},
},
},
}
Expand Down Expand Up @@ -2000,9 +1994,6 @@ var _ = Describe("HyperconvergedController", func() {
ObjectMeta: metav1.ObjectMeta{
Name: operatorMetrics,
Namespace: namespace,
Labels: map[string]string{
hcoutil.AppLabel: expected.hco.Name,
},
},
},
}
Expand Down

0 comments on commit e0cadb4

Please sign in to comment.