Skip to content

Commit b160d45

Browse files
author
Soroosh Sarabadani
committed
Add getDefaultFinalizerName method
1 parent efeb4b2 commit b160d45

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

operator-framework/src/main/java/io/javaoperatorsdk/operator/api/ResourceController.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ public interface ResourceController<R extends CustomResource> {
2828
*/
2929
UpdateControl<R> createOrUpdateResource(R resource, Context<R> context);
3030

31+
// What about we let developer to set the finalizer Name through overriding
32+
// this method rather than setting it as attribute in annotation?
33+
default String getDefaultFinalizerName() {
34+
return this.getClass().getCanonicalName();
35+
}
36+
3137
}

0 commit comments

Comments
 (0)