Skip to content
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

The wording of the client's settings override can be confusing and would be good to fix #2372

Closed
Junuu opened this issue Jan 10, 2024 · 8 comments
Milestone

Comments

@Junuu
Copy link

Junuu commented Jan 10, 2024

Hello and good day.
First of all, I thought this part of the bug report and feature request was a little ambiguous because it is a document part, but I tried to categorize it as a bug report first. Thank you for your understanding.

I'm taking a step-by-step approach to configuring Spring Cloud.

I was trying to override the value provided by the server in the spring cloud config client and finally succeeded in overriding it after looking at the spring official documentation and stackover.

I attach the git repository for your reference
https://github.com/Junuu/spring-study/tree/main/spring-cloud-config-server
https://github.com/Junuu/spring-study/tree/main/spring-cloud-config-client
https://github.com/Junuu/spring-study/blob/main/testapplication-local.yml
https://github.com/Junuu/spring-study/blob/main/testapplication-dev.yml

image

This is where I found the official documentation confusing, and it would be nice to see it added to say that you need to add an override setting to the "remote" part.

Here's that documentation
https://docs.spring.io/spring-cloud-config/docs/4.0.4/reference/html/#_using_bootstrap_to_override_properties

I thought I had to add it to the client or server configuration, and then I found out from other articles that it should be added to the remote configuration file.

Here's that documentation
https://cloud.spring.io/spring-cloud-static/spring-cloud.html#overriding-bootstrap-properties

As a result, I thought it would be nice to add the following.

"If you want to allow your applications to override the remote properties with their own System properties or config files, the remote property source has to grant it permission by setting"

@ryanjbaxter
Copy link
Contributor

That is basically the same as what we already say in the documentation

within the applications configuration coming from the config server

@Junuu
Copy link
Author

Junuu commented Jan 10, 2024

Does the term config server refer to an external repository like Git or Valut?

I think the yml configuration in Git or Valut etc is the remote configuration.

So I made the mistake of thinking of the Config Server term as the Spring Cloud Config Server and writing the Override property in that server's application.yml.

But in the end, I realized that I should have written the Override property in the application-local.yml of the Git repository.

This could be an error in translation as I don't speak English very well.

Thank you for your response.

@ryanjbaxter
Copy link
Contributor

No the key is the terms "applications configuration". This is referring to the the application's configuration being served up from the config server which is stored in Git, Vault, or any other environment repository.

@Junuu
Copy link
Author

Junuu commented Jan 10, 2024

Thank you for your prompt response.

I appreciate your assistance in clarifying the documentation. Your explanation has certainly helped me understand the context better. However, I believe that the current wording might still be a bit confusing for others as well.

I suggest making the following change in the documentation:

as-is

If you enable config first bootstrap, you can allow client applications to override configuration from the config server by placing two properties within the applications configuration coming from the config server.

to-be

"If you enable config first bootstrap, you can allow client settings to override configuration from the config server by placing two properties within the applications configuration, which may include settings from external environment repositories such as Valut and Git."

If you find this suggestion reasonable, I would be more than happy to create a Pull Request to implement the proposed change. However, if you have any reservations or prefer an alternative approach, please feel free to discuss it further or close this issue accordingly.

Once again, thank you for your help and consideration.

Thank you.

@ryanjbaxter
Copy link
Contributor

Thanks, I would just change the wording slightly...

If you enable config first bootstrap, you can allow client settings to override configuration from the config server by placing two properties within the applications configuration residing in the external environment repository(for example Git, Vault, SVN, etc) used by the config server.

How does that sound?

@Buzzardo
Copy link
Contributor

I'd change that to:

If you enable config-first bootstrap, you can let client settings override configuration from the config server by placing two properties within the applications configuration that reside in the external environment repository (for example, Git, Vault, SVN, and others) used by the config server.

@ryanjbaxter
Copy link
Contributor

Thanks @Buzzardo lets go with that!

@Junuu
Copy link
Author

Junuu commented Jan 11, 2024

Thanks for the quick reflection!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Status: Done
Development

No branches or pull requests

4 participants