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 deletion handling keyfunc where needed #2519

Merged
merged 1 commit into from
Dec 21, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type Controller struct {
}

func (c *Controller) enqueue(obj interface{}) {
key, err := kcpcache.MetaClusterNamespaceKeyFunc(obj)
key, err := kcpcache.DeletionHandlingMetaClusterNamespaceKeyFunc(obj)
if err != nil {
runtime.HandleError(err)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type Controller struct {
}

func (c *Controller) enqueue(obj interface{}) {
key, err := kcpcache.MetaClusterNamespaceKeyFunc(obj)
key, err := kcpcache.DeletionHandlingMetaClusterNamespaceKeyFunc(obj)
if err != nil {
runtime.HandleError(err)
return
Expand All @@ -114,7 +114,7 @@ func (c *Controller) enqueue(obj interface{}) {
}

func (c *Controller) enqueueCRB(obj interface{}) {
key, err := kcpcache.MetaClusterNamespaceKeyFunc(obj)
key, err := kcpcache.DeletionHandlingMetaClusterNamespaceKeyFunc(obj)
if err != nil {
runtime.HandleError(err)
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/workload/resource/resource_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ type Controller struct {
}

func filterNamespace(obj interface{}) bool {
key, err := kcpcache.MetaClusterNamespaceKeyFunc(obj)
key, err := kcpcache.DeletionHandlingMetaClusterNamespaceKeyFunc(obj)
if err != nil {
runtime.HandleError(err)
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
workloadv1alpha1informers "github.com/kcp-dev/kcp/pkg/client/informers/externalversions/workload/v1alpha1"
apisv1alpha1listers "github.com/kcp-dev/kcp/pkg/client/listers/apis/v1alpha1"
workloadv1alpha1listers "github.com/kcp-dev/kcp/pkg/client/listers/workload/v1alpha1"
indexers "github.com/kcp-dev/kcp/pkg/indexers"
"github.com/kcp-dev/kcp/pkg/indexers"
"github.com/kcp-dev/kcp/pkg/logging"
"github.com/kcp-dev/kcp/pkg/virtual/framework/dynamic/apidefinition"
dynamiccontext "github.com/kcp-dev/kcp/pkg/virtual/framework/dynamic/context"
Expand Down Expand Up @@ -148,7 +148,7 @@ type APIReconciler struct {
}

func (c *APIReconciler) enqueueSyncTarget(obj interface{}, logger logr.Logger, logSuffix string) {
key, err := kcpcache.MetaClusterNamespaceKeyFunc(obj)
key, err := kcpcache.DeletionHandlingMetaClusterNamespaceKeyFunc(obj)
if err != nil {
runtime.HandleError(err)
return
Expand Down