Skip to content

Conversation

@wind57
Copy link
Contributor

@wind57 wind57 commented Sep 25, 2025

No description provided.

Signed-off-by: wind57 <eugen.rabii@gmail.com>
@wind57 wind57 changed the title fix issue 2008 fix issue 2008 (3.2.x) Sep 25, 2025
Signed-off-by: wind57 <eugen.rabii@gmail.com>
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,
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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>> {
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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);
				}

@wind57 wind57 marked this pull request as ready for review September 26, 2025 14:56
@wind57
Copy link
Contributor Author

wind57 commented Sep 26, 2025

@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.

@ryanjbaxter ryanjbaxter added this to the 3.2.3 milestone Sep 26, 2025
@ryanjbaxter ryanjbaxter merged commit 0986d3b into spring-cloud:3.2.x Sep 26, 2025
18 checks passed
@github-project-automation github-project-automation bot moved this to Done in 2024.0.3 Sep 26, 2025
@github-project-automation github-project-automation bot moved this to Done in 2025.0.1 Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done
Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

Skipping configmap events due to The current number of PropertySources does not match the ones loaded from Kubernetes - No reload will take place

3 participants