Skip to content

Commit 668097f

Browse files
committed
wip
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent 11e5232 commit 668097f

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/ResourceOperations.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import io.fabric8.kubernetes.api.model.HasMetadata;
2626
import io.fabric8.kubernetes.api.model.ObjectMeta;
27-
import io.fabric8.kubernetes.client.KubernetesClient;
2827
import io.fabric8.kubernetes.client.KubernetesClientException;
2928
import io.fabric8.kubernetes.client.dsl.base.PatchContext;
3029
import io.fabric8.kubernetes.client.dsl.base.PatchType;
@@ -387,9 +386,8 @@ public P addFinalizer() {
387386

388387
/**
389388
* Adds finalizer to the resource using JSON Patch. Retries conflicts and unprocessable content
390-
* (HTTP 422), see {@link PrimaryUpdateAndCacheUtils#conflictRetryingPatch(KubernetesClient,
391-
* HasMetadata, UnaryOperator, Predicate)} for details on retry. It does not try to add finalizer
392-
* if there is already a finalizer or resource is marked for deletion.
389+
* (HTTP 422). It does not try to add finalizer if there is already a finalizer or resource is
390+
* marked for deletion.
393391
*
394392
* @return updated resource from the server response
395393
*/
@@ -419,10 +417,8 @@ public P removeFinalizer() {
419417
}
420418

421419
/**
422-
* Removes the target finalizer from the primary resource. Uses JSON Patch and handles retries,
423-
* see {@link PrimaryUpdateAndCacheUtils#conflictRetryingPatch(KubernetesClient, HasMetadata,
424-
* UnaryOperator, Predicate)} for details. It does not try to remove finalizer if finalizer is not
425-
* present on the resource.
420+
* Removes the target finalizer from the primary resource. Uses JSON Patch and handles retries. It
421+
* does not try to remove finalizer if finalizer is not present on the resource.
426422
*
427423
* @return updated resource from the server response
428424
*/
@@ -516,10 +512,9 @@ public <R extends HasMetadata> R conflictRetryingPatch(
516512
* String)} with the configured finalizer name.
517513
*
518514
* @return the patched resource from the server response
519-
* @param <P> primary resource type
520515
* @see #addFinalizerWithSSA(String)
521516
*/
522-
public <P extends HasMetadata> P addFinalizerWithSSA() {
517+
public P addFinalizerWithSSA() {
523518
return addFinalizerWithSSA(context.getControllerConfiguration().getFinalizerName());
524519
}
525520

@@ -530,9 +525,8 @@ public <P extends HasMetadata> P addFinalizerWithSSA() {
530525
*
531526
* @param finalizerName name of the finalizer to add
532527
* @return the patched resource from the server response
533-
* @param <P> primary resource type
534528
*/
535-
public <P extends HasMetadata> P addFinalizerWithSSA(String finalizerName) {
529+
public P addFinalizerWithSSA(String finalizerName) {
536530
var originalResource = context.getPrimaryResource();
537531
if (log.isDebugEnabled()) {
538532
log.debug(

0 commit comments

Comments
 (0)