Skip to content

Commit 5d593c1

Browse files
committed
dirty
1 parent ac23677 commit 5d593c1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigMapPropertySourceLocator.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@ public PropertySource<?> locate(Environment environment) {
8484
LOG.debug("Config Map normalized sources : " + sources);
8585
sources.forEach(s -> {
8686
MapPropertySource propertySource = getMapPropertySource(s, env);
87-
LOG.debug("Adding config map property source " + propertySource.getName());
88-
composite.addFirstPropertySource(propertySource);
87+
if ("true".equals(propertySource.getProperty(Constants.ERROR_PROPERTY))) {
88+
LOG.warn("Failed to load config map: " + s.name());
89+
}
90+
else {
91+
LOG.debug("Adding config map property source " + propertySource.getName());
92+
composite.addFirstPropertySource(propertySource);
93+
}
8994
});
9095
}
9196

0 commit comments

Comments
 (0)