diff --git a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/reload/ConfigurationChangeDetector.java b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/reload/ConfigurationChangeDetector.java index 182e86d1..c29dc7d0 100644 --- a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/reload/ConfigurationChangeDetector.java +++ b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/reload/ConfigurationChangeDetector.java @@ -81,10 +81,17 @@ public abstract class ConfigurationChangeDetector { } public boolean changed(List left, List right) { - if (left.size() != right.size()) { this.log.warn("The current number of ConfigMap PropertySources does not match " + "the ones loaded from the Kubernetes - No reload will take place"); + + if (log.isDebugEnabled()) { + this.log.debug(String.format("source 1: %d", left.size())); + left.forEach(item -> log.debug(item)); + + this.log.debug(String.format("source 2: %d", right.size())); + right.forEach(item -> log.debug(item)); + } return false; } @@ -123,6 +130,10 @@ public abstract class ConfigurationChangeDetector { List managedSources = new LinkedList<>(); LinkedList> sources = toLinkedList(this.environment.getPropertySources()); + this.log.debug("findPropertySources"); + this.log.debug(String.format("environment: %s", this.environment)); + this.log.debug(String.format("environment sources: %s", sources)); + while (!sources.isEmpty()) { PropertySource source = sources.pop(); if (source instanceof CompositePropertySource) { @@ -176,6 +187,10 @@ public abstract class ConfigurationChangeDetector { this.log.debug("Found property source that cannot be handled: " + propertySource.getClass()); } + this.log.debug("locateMapPropertySources"); + this.log.debug(String.format("environment: %s", environment)); + this.log.debug(String.format("sources: %s", result)); + return result; }