Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,7 @@ public synchronized void start() {
}
temporaryResourceCache =
new TemporaryResourceCache<>(
comparableResourceVersions,
configuration.getInformerConfig().getGhostResourceCacheCheckInterval().toMillis(),
controllerConfiguration
.getConfigurationService()
.getExecutorServiceManager()
.scheduledExecutorService(),
this);
comparableResourceVersions,this);
this.cache = new InformerManager<>(client, configuration, this);
cache.setControllerConfiguration(controllerConfiguration);
cache.addIndexers(indexers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,9 @@ public enum EventHandling {

public TemporaryResourceCache(
boolean comparableResourceVersions,
long ghostResourceCheckInterval,
ScheduledExecutorService ghostCheckExecutor,
ManagedInformerEventSource<T, ?, ?> managedInformerEventSource) {
this.comparableResourceVersions = comparableResourceVersions;
this.managedInformerEventSource = managedInformerEventSource;
if (comparableResourceVersions) {
ghostCheckExecutor.scheduleWithFixedDelay(
this::checkGhostResources,
ghostResourceCheckInterval,
ghostResourceCheckInterval,
TimeUnit.MILLISECONDS);
}
}

public synchronized void startEventFilteringModify(ResourceID resourceID) {
Expand Down Expand Up @@ -240,7 +231,7 @@ private String getLastSyncResourceVersion(String namespace) {
* In this case neither the ADD nor DELETE event will be propagated to the informer, but we
* explicitly add resources to this cache. Those are cleaned up by this check.
*/
private void checkGhostResources() {
public void checkGhostResources() {
log.debug("Checking for ghost resources.");
var iterator = cache.entrySet().iterator();
while (iterator.hasNext()) {
Expand Down
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<fabric8-httpclient-impl.name>jdk</fabric8-httpclient-impl.name>
<junit.version>6.0.3</junit.version>
<fabric8-client.version>7.6.1</fabric8-client.version>
<fabric8-client.version>7.7-SNAPSHOT</fabric8-client.version>
<slf4j.version>2.0.17</slf4j.version>
<log4j.version>2.25.3</log4j.version>
<mokito.version>5.23.0</mokito.version>
Expand Down Expand Up @@ -621,4 +621,15 @@
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

</project>
Loading