Skip to content

Commit 934bda8

Browse files
authored
Merge pull request #898 from ruromero/k8sresource
✨ Introduce controllerutil.Object interface
2 parents ca25c1f + ea2e6b1 commit 934bda8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/controller/controllerutil/controllerutil.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,10 @@ func RemoveFinalizerWithError(o runtime.Object, finalizer string) error {
281281
RemoveFinalizer(m, finalizer)
282282
return nil
283283
}
284+
285+
// Object allows functions to work indistinctly with any resource that
286+
// implements both Object interfaces.
287+
type Object interface {
288+
metav1.Object
289+
runtime.Object
290+
}

0 commit comments

Comments
 (0)