diff --git a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigUtils.java b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigUtils.java index f4a598fc5..572242332 100644 --- a/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigUtils.java +++ b/spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigUtils.java @@ -231,7 +231,7 @@ public static MultipleSourcesContainer processNamedData(List rawData, String[] activeProfiles) { return rawData.keySet().stream().anyMatch( - key -> Arrays.stream(activeProfiles).anyMatch(activeProfile -> key.endsWith("-" + activeProfile) + key -> Arrays.stream(activeProfiles).anyMatch(activeProfile -> key.contains("-" + activeProfile) || "default".equals(activeProfile))); }