Skip to content

Commit 7bd5735

Browse files
committed
docs
1 parent 7ce2800 commit 7bd5735

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/externalstate/ExternalStateReconciler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ private void createExternalResource(ExternalStateCustomResource resource) {
7878
client.configMaps().resource(configMap).create();
7979

8080
var primaryID = ResourceID.fromResource(resource);
81+
// Making sure that the created resources are in the cache for the next reconciliation.
82+
// This is critical in this case, since on next reconciliation if it would not be in the cache
83+
// it
84+
// would be created again.
8185
configMapEventSource.handleRecentResourceCreate(primaryID, configMap);
8286
externalResourceEventSource.handleRecentResourceCreate(primaryID, createdResource);
8387
}

0 commit comments

Comments
 (0)