feat(parameter): added support for remote configuration using the gcp parameter manager#3684
Conversation
…t-for-remote-configuration-from-parameter-manager
|
@suvidha-malaviya Would you mind creating a feature request in the issue tracker for this and linking it to this PR? Thanks! |
Sure. I have created the issue #3693 |
|
I followed the steps in the README, but I'm getting failures when I run the integration test. Details in b/428016553. |
…ration-from-parameter-manager
The issue was due to the |
Thanks for looking into this. I'm still getting the following error though: |
@jinseopkim0, I’ve added an additional commit updating the README. Need to create parameter version using myapp.username and myapp.password instead of just username and password. |
|
Integration test passed: |
|
|
||
| $ gcloud beta parametermanager parameters create myapp --location=global --parameter-format=JSON | ||
|
|
||
| $ gcloud beta parametermanager parameters versions create prod --parameter=myapp --location=global --payload-data="{\"username\":\"test-user\",\"password\":\"test-password\"}" |
There was a problem hiding this comment.
should this be
| $ gcloud beta parametermanager parameters versions create prod --parameter=myapp --location=global --payload-data="{\"username\":\"test-user\",\"password\":\"test-password\"}" | |
| $ gcloud beta parametermanager parameters versions create prod --parameter=myapp --location=global --payload-data="{\"myapp.username\":\"test-user\",\"myapp.password\":\"test-password\"}" |
same as readme here?
There was a problem hiding this comment.
I've updated the parameter.adoc file.
Head branch was pushed to by a user without write access
… parameter manager (#3684) * feat(paramconfig): added support for remote configuration using the gcp parameter manager * feat(paramconfig): minor fix * feat(paramconfig): updated with render parameter method * feat(parameter): updated with parameter naming convention * feat(parameter): updated with parameter naming convention * feat(parametermanager): addressed review comments * fix(parametermanager): Updated README for Parameter Manager sample * fix(parametermanager): Update path of the file in README.adoc * fix: update spring-cloud-gcp version * fix: path to the suppressions file for maven-checkstyle-plugin * chore: update spring-cloud-gcp versions to 7.0.1-SNAPSHOT * feat(paramconfig): Update parameter.adoc file --------- Co-authored-by: Jin Seop Kim <[email protected]> Co-authored-by: Jin Seop Kim <[email protected]>
… parameter manager (#3684) * feat(paramconfig): added support for remote configuration using the gcp parameter manager * feat(paramconfig): minor fix * feat(paramconfig): updated with render parameter method * feat(parameter): updated with parameter naming convention * feat(parameter): updated with parameter naming convention * feat(parametermanager): addressed review comments * fix(parametermanager): Updated README for Parameter Manager sample * fix(parametermanager): Update path of the file in README.adoc * fix: update spring-cloud-gcp version * fix: path to the suppressions file for maven-checkstyle-plugin * chore: update spring-cloud-gcp versions to 7.0.1-SNAPSHOT * feat(paramconfig): Update parameter.adoc file --------- Co-authored-by: Jin Seop Kim <[email protected]>
… parameter manager (#3684) * feat(paramconfig): added support for remote configuration using the gcp parameter manager * feat(paramconfig): minor fix * feat(paramconfig): updated with render parameter method * feat(parameter): updated with parameter naming convention * feat(parameter): updated with parameter naming convention * feat(parametermanager): addressed review comments * fix(parametermanager): Updated README for Parameter Manager sample * fix(parametermanager): Update path of the file in README.adoc * fix: update spring-cloud-gcp version * fix: path to the suppressions file for maven-checkstyle-plugin * chore: update spring-cloud-gcp versions to 7.0.1-SNAPSHOT * feat(paramconfig): Update parameter.adoc file --------- Co-authored-by: Jin Seop Kim <[email protected]> Co-authored-by: Jin Seop Kim <[email protected]>
… parameter manager (#3684) * feat(paramconfig): added support for remote configuration using the gcp parameter manager * feat(paramconfig): minor fix * feat(paramconfig): updated with render parameter method * feat(parameter): updated with parameter naming convention * feat(parameter): updated with parameter naming convention * feat(parametermanager): addressed review comments * fix(parametermanager): Updated README for Parameter Manager sample * fix(parametermanager): Update path of the file in README.adoc * fix: update spring-cloud-gcp version * fix: path to the suppressions file for maven-checkstyle-plugin * chore: update spring-cloud-gcp versions to 7.0.1-SNAPSHOT * feat(paramconfig): Update parameter.adoc file --------- Co-authored-by: Jin Seop Kim <[email protected]>
… parameter manager (#3684) * feat(paramconfig): added support for remote configuration using the gcp parameter manager * feat(paramconfig): minor fix * feat(paramconfig): updated with render parameter method * feat(parameter): updated with parameter naming convention * feat(parameter): updated with parameter naming convention * feat(parametermanager): addressed review comments * fix(parametermanager): Updated README for Parameter Manager sample * fix(parametermanager): Update path of the file in README.adoc * fix: update spring-cloud-gcp version * fix: path to the suppressions file for maven-checkstyle-plugin * chore: update spring-cloud-gcp versions to 7.0.1-SNAPSHOT * feat(paramconfig): Update parameter.adoc file --------- Co-authored-by: Jin Seop Kim <[email protected]>
… parameter manager (#3684) * feat(paramconfig): added support for remote configuration using the gcp parameter manager * feat(paramconfig): minor fix * feat(paramconfig): updated with render parameter method * feat(parameter): updated with parameter naming convention * feat(parameter): updated with parameter naming convention * feat(parametermanager): addressed review comments * fix(parametermanager): Updated README for Parameter Manager sample * fix(parametermanager): Update path of the file in README.adoc * fix: update spring-cloud-gcp version * fix: path to the suppressions file for maven-checkstyle-plugin * chore: update spring-cloud-gcp versions to 7.0.1-SNAPSHOT * feat(paramconfig): Update parameter.adoc file --------- Co-authored-by: Jin Seop Kim <[email protected]> Co-authored-by: Jin Seop Kim <[email protected]>
… parameter manager (#3684) * feat(paramconfig): added support for remote configuration using the gcp parameter manager * feat(paramconfig): minor fix * feat(paramconfig): updated with render parameter method * feat(parameter): updated with parameter naming convention * feat(parameter): updated with parameter naming convention * feat(parametermanager): addressed review comments * fix(parametermanager): Updated README for Parameter Manager sample * fix(parametermanager): Update path of the file in README.adoc * fix: update spring-cloud-gcp version * fix: path to the suppressions file for maven-checkstyle-plugin * chore: update spring-cloud-gcp versions to 7.0.1-SNAPSHOT * feat(paramconfig): Update parameter.adoc file --------- Co-authored-by: Jin Seop Kim <[email protected]>
… parameter manager (#3684) * feat(paramconfig): added support for remote configuration using the gcp parameter manager * feat(paramconfig): minor fix * feat(paramconfig): updated with render parameter method * feat(parameter): updated with parameter naming convention * feat(parameter): updated with parameter naming convention * feat(parametermanager): addressed review comments * fix(parametermanager): Updated README for Parameter Manager sample * fix(parametermanager): Update path of the file in README.adoc * fix: update spring-cloud-gcp version * fix: path to the suppressions file for maven-checkstyle-plugin * chore: update spring-cloud-gcp versions to 7.0.1-SNAPSHOT * feat(paramconfig): Update parameter.adoc file --------- Co-authored-by: Jin Seop Kim <[email protected]> Co-authored-by: Jin Seop Kim <[email protected]>
… parameter manager (#3684) * feat(paramconfig): added support for remote configuration using the gcp parameter manager * feat(paramconfig): minor fix * feat(paramconfig): updated with render parameter method * feat(parameter): updated with parameter naming convention * feat(parameter): updated with parameter naming convention * feat(parametermanager): addressed review comments * fix(parametermanager): Updated README for Parameter Manager sample * fix(parametermanager): Update path of the file in README.adoc * fix: update spring-cloud-gcp version * fix: path to the suppressions file for maven-checkstyle-plugin * chore: update spring-cloud-gcp versions to 7.0.1-SNAPSHOT * feat(paramconfig): Update parameter.adoc file --------- Co-authored-by: Jin Seop Kim <[email protected]>
Backports the following PRs to 6.x: #3699, #3684, #4127 --------- Co-authored-by: suvidha-malaviya <[email protected]>
Issue: #3693
Description
This pull request introduces a new feature to the Spring Cloud GCP library, adding support for the
parametermodule. This enhancement enables the library to fetch configuration parameters stored in the GCP Parameter Manager.Proposed Changes:
parametermodule to the Spring Cloud GCP library.spring-cloud-gcp-param-config-sampleto showcase the usage.parameter.adoc.Refer to the parameter.adoc file for detailed documentation.
Performed the below mentioned manual unit tests to validate the working of the global and regional remote configuration fetched from the GCP Parameter Manager.
applicationand versiondefaultspring.cloud.gcp.parameter.enabled=truemyappand versiondefaultspring.cloud.gcp.parameter.enabled=truespring.application.name=myappmyappand versiondefaultfrom the specified projectspring.cloud.gcp.parameter.enabled=truespring.application.name=myappspring.cloud.gcp.parameter.project-id=pariahmyappand versionprod(store JSON content with key value pair)spring.cloud.gcp.parameter.enabled=truespring.application.name=myappspring.profiles.active=prodmyappand versionprodspring.cloud.gcp.parameter.enabled=truespring.cloud.gcp.parameter.name=myappspring.cloud.gcp.parameter.profile=prodspring.cloud.gcp.parameter.enabled=falsespring.application.name=myappspring.profiles.active=prodmyappandversionprod (store YAML content with key value pair)spring.cloud.gcp.parameter.enabled=truespring.application.name=myappspring.profiles.active=prodmyappand versionprod(store Unstructured contentspring.cloud.gcp.parameter.enabled=truespring.application.name=myappspring.profiles.active=prodspring.cloud.gcp.parameter.enabled=truespring.application.name=myappspring.profiles.active=dev,prodspring.cloud.gcp.parameter.enabled=truespring.application.name=myappspring.profiles.active=dev,prodcurl -XPOST http://localhost:8080/actuator/refreshMore information about parameter manager: https://cloud.google.com/secret-manager/parameter-manager/docs/overview