davsclaus commented on code in PR #27801:
URL: https://github.com/apache/camel/pull/27801#discussion_r4266928794


##########
components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/secrets/vault/SecretsReloadTriggerTask.java:
##########
@@ -48,9 +49,15 @@ public class SecretsReloadTriggerTask extends ServiceSupport 
implements CamelCon
     private KubernetesClient kubernetesClient;
     private SecretPropertiesFunction propertiesFunction;
     private volatile Instant startingTime;
+    // released when the current watch is closed with an error, when the wait 
before the next watch is over, and when
+    // this task is stopped
+    private volatile CountDownLatch released;
 
     private static final Logger LOG = 
LoggerFactory.getLogger(SecretsReloadTriggerTask.class);
 
+    static final long WATCH_AGAIN_DELAY_MILLIS = 1000;

Review Comment:
   These two constants now exist three times (here, in 
`ConfigmapsReloadTriggerTask` and in `KubernetesHelper`), and 
`run()`/`waitBeforeWatchingAgain()`/`doStop()` are the same in both tasks apart 
from the resource type. Not blocking. A shared helper that takes a 
`Function<CountDownLatch, Watch>` (or making the `KubernetesHelper` constants 
public) would keep them from drifting apart. That can be a follow-up.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to