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


##########
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:
   Agreed that the loop, the wait and `doStop` of the two tasks are the same 
and that the delays are a third copy. The
   tasks are in two packages (`secrets.vault`, `config_maps.vault`), so a 
shared helper has to be public (a public
   helper in `org.apache.camel.component.kubernetes`, or public constants in 
`KubernetesHelper`). I would rather not add
   that public API to this approved fix and will do it as a follow-up, together 
with the informer you mention in point 2
   of the review.
   
   _Claude Code on behalf of allthingssecurity_



-- 
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