|
2 | 2 |
|
3 | 3 |
|
4 | 4 | import io.fabric8.kubernetes.client.CustomResource;
|
5 |
| -import io.fabric8.kubernetes.client.dsl.internal.CustomResourceOperationsImpl; |
6 |
| -import io.javaoperatorsdk.operator.processing.event.*; |
| 5 | +import io.javaoperatorsdk.operator.processing.event.DefaultEventSourceManager; |
| 6 | +import io.javaoperatorsdk.operator.processing.event.Event; |
| 7 | +import io.javaoperatorsdk.operator.processing.event.EventHandler; |
7 | 8 | import org.slf4j.Logger;
|
8 | 9 | import org.slf4j.LoggerFactory;
|
9 | 10 |
|
10 |
| -import java.time.LocalDateTime; |
11 | 11 | import java.util.HashSet;
|
12 | 12 | import java.util.Optional;
|
13 | 13 | import java.util.Set;
|
|
16 | 16 | import java.util.concurrent.locks.ReentrantLock;
|
17 | 17 |
|
18 | 18 | import static io.javaoperatorsdk.operator.EventListUtils.containsCustomResourceDeletedEvent;
|
19 |
| -import static io.javaoperatorsdk.operator.processing.KubernetesResourceUtils.*; |
| 19 | +import static io.javaoperatorsdk.operator.processing.KubernetesResourceUtils.getUID; |
| 20 | +import static io.javaoperatorsdk.operator.processing.KubernetesResourceUtils.getVersion; |
20 | 21 |
|
21 | 22 | /**
|
22 | 23 | * Event handler that makes sure that events are processed in a "single threaded" way per resource UID, while buffering
|
@@ -108,7 +109,6 @@ void eventProcessingFinished(ExecutionScope executionScope, PostExecutionControl
|
108 | 109 | */
|
109 | 110 | private void cacheUpdatedResourceIfChanged(ExecutionScope executionScope, PostExecutionControl postExecutionControl) {
|
110 | 111 | if (postExecutionControl.customResourceUpdatedDuringExecution()) {
|
111 |
| - |
112 | 112 | CustomResource originalCustomResource = executionScope.getCustomResource();
|
113 | 113 | CustomResource customResourceAfterExecution = postExecutionControl.getUpdatedCustomResource().get();
|
114 | 114 | CustomResource cachedVersion = this.customResourceCache.getLatestResource(getUID(customResourceAfterExecution)).get();
|
|
0 commit comments