-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Auto-Reload for SecretsManager
& ParameterStore
property sources
#536
Conversation
SecretsManager
property sourceSecretsManager
& ParameterStore
property sources
@NestedConfigurationProperty | ||
private ReloadProperties reload = new ReloadProperties(); | ||
|
||
private boolean monitored; |
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.
Perhaps this should be moved to ReloadProperties
.
@MatejNedic docs are pending but other than that ready for review. Depending on how goes with spring-cloud/spring-cloud-commons#1156 maybe there will be a space for improvements in the future. |
@MatejNedic reference docs added. |
Fixes #377 |
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.
Looks good.
I have left a few comments.
@@ -234,7 +324,8 @@ private static void putParameter(LocalStackContainer localstack, String paramete | |||
} | |||
} | |||
|
|||
@SpringBootApplication | |||
@SpringBootConfiguration |
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.
What is the reason for removing SpringBootApplication
and replacing it with these 2 annotations?
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.
To disable component scanning as it was picking up configuration classes declared in the same package in other tests.
...d-aws-secrets-manager-sample/src/main/java/io/awspring/cloud/samples/secretsmanager/App.java
Outdated
Show resolved
Hide resolved
...loud/autoconfigure/config/parameterstore/ParameterStoreConfigDataLoaderIntegrationTests.java
Outdated
Show resolved
Hide resolved
...wspring/cloud/autoconfigure/config/secretsmanager/SecretsManagerReloadAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...wspring/cloud/autoconfigure/config/parameterstore/ParameterStoreReloadAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...wspring/cloud/autoconfigure/config/secretsmanager/SecretsManagerReloadAutoConfiguration.java
Outdated
Show resolved
Hide resolved
@AutoConfigureAfter({ InfoEndpointAutoConfiguration.class, RefreshEndpointAutoConfiguration.class, | ||
RefreshAutoConfiguration.class }) | ||
@ConditionalOnProperty(value = ParameterStoreProperties.CONFIG_PREFIX + ".reload.strategy") | ||
public class ParameterStoreReloadAutoConfiguration { |
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.
@ConditionalOnBean(ContextRefresher.class)
@MatejNedic thanks for a review. Changes applied. |
SonarCloud Quality Gate failed. |
Auto-reloading
SecretsManager
&ParameterStore
property source inspired by Spring Cloud Kubernetes implementation.Turned off by default.
TODO: tests for autoconfigurations, update samples & reference docs.