-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix issue 2008 (3.2.x) #2015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.