Skip to content

Commit

Permalink
Merge pull request #405 from darkowlzz/client-objectkeyfromobject
Browse files Browse the repository at this point in the history
Use ObjectKeyFromObject instead of ObjectKey
  • Loading branch information
hiddeco authored Jul 26, 2021
2 parents 40a4767 + 9825a60 commit dbaf8bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
7 changes: 3 additions & 4 deletions controllers/helmchart_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ import (

sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
"github.com/fluxcd/source-controller/internal/helm"
"github.com/fluxcd/source-controller/internal/util"
)

// +kubebuilder:rbac:groups=source.toolkit.fluxcd.io,resources=helmcharts,verbs=get;list;watch;create;update;patch;delete
Expand Down Expand Up @@ -926,7 +925,7 @@ func (r *HelmChartReconciler) requestsForHelmRepositoryChange(o client.Object) [
// enqueued twice.
var reqs []reconcile.Request
for _, i := range list.Items {
reqs = append(reqs, reconcile.Request{NamespacedName: util.ObjectKey(&i)})
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
}
return reqs
}
Expand Down Expand Up @@ -955,7 +954,7 @@ func (r *HelmChartReconciler) requestsForGitRepositoryChange(o client.Object) []
// enqueued twice.
var reqs []reconcile.Request
for _, i := range list.Items {
reqs = append(reqs, reconcile.Request{NamespacedName: util.ObjectKey(&i)})
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
}
return reqs
}
Expand Down Expand Up @@ -984,7 +983,7 @@ func (r *HelmChartReconciler) requestsForBucketChange(o client.Object) []reconci
// enqueued twice.
var reqs []reconcile.Request
for _, i := range list.Items {
reqs = append(reqs, reconcile.Request{NamespacedName: util.ObjectKey(&i)})
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
}
return reqs
}
Expand Down
30 changes: 0 additions & 30 deletions internal/util/util.go

This file was deleted.

0 comments on commit dbaf8bf

Please sign in to comment.