File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
operator-framework/src/main/java/io/javaoperatorsdk/operator Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ public interface ResourceController<R extends CustomResource> {
6
6
7
7
/**
8
8
* The implementation should delete the associated component(s). Note that this is method is called when an object
9
- * is marked for deletion. After its executed the default finalizer is automatically removed by the framework;
9
+ * is marked for deletion. After its executed the custom resource finalizer is automatically removed by the framework;
10
10
* unless the return value is false - note that this is almost never the case.
11
11
* Its important to have the implementation also idempotent, in the current implementation to cover all edge cases
12
12
* actually will be executed mostly twice.
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public void handleEvent(CustomResourceEvent event) {
60
60
cleanup (resource );
61
61
} else {
62
62
if (!ControllerUtils .hasGivenFinalizer (resource , resourceFinalizer ) && !markedForDeletion (resource )) {
63
- /* We always add the default finalizer if missing and not marked for deletion.
63
+ /* We always add a finalizer if missing and not marked for deletion.
64
64
We execute the controller processing only for processing the event sent as a results
65
65
of the finalizer add. This will make sure that the resources are not created before
66
66
there is a finalizer.
@@ -131,7 +131,7 @@ private void replace(CustomResource resource) {
131
131
132
132
private void addFinalizerIfNotPresent (CustomResource resource ) {
133
133
if (!ControllerUtils .hasGivenFinalizer (resource , resourceFinalizer ) && !markedForDeletion (resource )) {
134
- log .info ("Adding default finalizer to {}" , resource .getMetadata ());
134
+ log .info ("Adding finalizer {} to {}" , resourceFinalizer , resource .getMetadata ());
135
135
if (resource .getMetadata ().getFinalizers () == null ) {
136
136
resource .getMetadata ().setFinalizers (new ArrayList <>(1 ));
137
137
}
You can’t perform that action at this time.
0 commit comments