Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ObjectKeyFromObject instead of ObjectKey #405

Merged
merged 1 commit into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.