Skip to content

Commit 85c09bc

Browse files
author
Soroosh Sarabadani
committed
rename defaultFinalizer to finalizer in logs and docs
1 parent f188c1f commit 85c09bc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public interface ResourceController<R extends CustomResource> {
66

77
/**
88
* 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;
1010
* unless the return value is false - note that this is almost never the case.
1111
* Its important to have the implementation also idempotent, in the current implementation to cover all edge cases
1212
* actually will be executed mostly twice.

operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/EventDispatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void handleEvent(CustomResourceEvent event) {
6060
cleanup(resource);
6161
} else {
6262
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.
6464
We execute the controller processing only for processing the event sent as a results
6565
of the finalizer add. This will make sure that the resources are not created before
6666
there is a finalizer.
@@ -131,7 +131,7 @@ private void replace(CustomResource resource) {
131131

132132
private void addFinalizerIfNotPresent(CustomResource resource) {
133133
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());
135135
if (resource.getMetadata().getFinalizers() == null) {
136136
resource.getMetadata().setFinalizers(new ArrayList<>(1));
137137
}

0 commit comments

Comments
 (0)