fix issue 2008 (3.2.x)#2015
Conversation
Signed-off-by: wind57 <eugen.rabii@gmail.com>
Signed-off-by: wind57 <eugen.rabii@gmail.com>
Signed-off-by: wind57 <eugen.rabii@gmail.com>
| * | ||
| * @author wind57 | ||
| */ | ||
| @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, |
There was a problem hiding this comment.
this is a test that uses the exact scenario the OP was presenting in the issue and shows that this is now fixed
| /** | ||
| * @author wind57 | ||
| */ | ||
| public final class MountSecretPropertySource extends SecretsPropertySource { |
There was a problem hiding this comment.
it was long due for us to have this. We have MountConfigMapPropertySource, but not one for secret. This has caused various issues over time and confusion. Introducing it should make things far easier imo
| */ | ||
| private static class SecretsPropertySourceCollector | ||
| implements Collector<Path, List<SecretsPropertySource>, List<SecretsPropertySource>> { | ||
| implements Collector<Path, List<MountSecretPropertySource>, List<MountSecretPropertySource>> { |
There was a problem hiding this comment.
the only change here is : SecretsPropertySource -> MountSecretPropertySource
| managedSources.add((S) mountConfigMapPropertySource); | ||
| } | ||
| else if (source instanceof SecretsPropertySource secretsPropertySource) { | ||
| else if (source instanceof MountSecretPropertySource mountSecretPropertySource) { |
There was a problem hiding this comment.
we now check for MountSecretPropertySource, exactly like we do in case of configmap:
else if (propertySource instanceof MountConfigMapPropertySource mountConfigMapPropertySource) {
// we know that the type is correct here
managedSources.add((S) mountConfigMapPropertySource);
}
else if (propertySource instanceof MountSecretPropertySource mountSecretPropertySource) {
// we know that the type is correct here
managedSources.add((S) mountSecretPropertySource);
}
|
@ryanjbaxter this is ready also. I know you said those breaking changes are a priority, but this one needs to be in main also, because later it will have many changes, both removal and insertions and this way it will be easier to handle. |
No description provided.