Skip to content

Commit

Permalink
fix of es mapping
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Mészáros <csviri@gmail.com>
  • Loading branch information
csviri committed Jan 31, 2024
1 parent 2c231ad commit 833b751
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ public synchronized void deRegisterInformer(GroupVersionKind groupVersionKind,
Context<ResourceFlow> context) {
var lastForGVK = unmarkEventSource(groupVersionKind, primary);
if (lastForGVK) {
log.debug("De-registering informer for gvk: {} primary: {}", groupVersionKind, primary);
context.eventSourceRetriever().dynamicallyDeRegisterEventSource(groupVersionKind.toString());
var es = context.eventSourceRetriever()
.dynamicallyDeRegisterEventSource(groupVersionKind.toString());
es.ifPresent(i -> log.debug("De-registered informer for gvk: {} primary: {}",
groupVersionKind, primary));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ public class RelatedResourceSecondaryToPrimaryMapper

@Override
public Set<ResourceID> toPrimaryResourceIDs(GenericKubernetesResource resource) {
// based on if GC or non GC dependent it can have different mapping
var res = Mappers.fromOwnerReferences(false).toPrimaryResourceIDs(resource);
res.addAll(Mappers.fromDefaultAnnotations().toPrimaryResourceIDs(resource));
// todo empty kind issue
// var idMapped = secondaryToPrimaryMap.get(
// new ResourceID(resource.getMetadata().getName(), resource.getMetadata().getNamespace()));
Expand Down

0 comments on commit 833b751

Please sign in to comment.