Skip to content

Commit

Permalink
Rename and move KubernetesObject
Browse files Browse the repository at this point in the history
Signed-off-by: ruromero <rromerom@redhat.com>
  • Loading branch information
ruromero committed Apr 20, 2020
1 parent 044e189 commit 1d05f23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pkg/client/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"

"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
)
Expand Down Expand Up @@ -134,10 +133,3 @@ func IgnoreNotFound(err error) error {
}
return err
}

// KubernetesResource allows functions to work indistinctly with any resource that
// implements both Object interfaces.
type KubernetesResource interface {
metav1.Object
runtime.Object
}
7 changes: 7 additions & 0 deletions pkg/controller/controllerutil/controllerutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,10 @@ func RemoveFinalizerWithError(o runtime.Object, finalizer string) error {
RemoveFinalizer(m, finalizer)
return nil
}

// KubernetesObject allows functions to work indistinctly with any resource that
// implements both Object interfaces.
type KubernetesObject interface {
metav1.Object
runtime.Object
}

0 comments on commit 1d05f23

Please sign in to comment.