You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "cbcbbcbc (via GitHub)" <gi...@apache.org> on 2023/06/17 02:42:25 UTC

[GitHub] [shardingsphere] cbcbbcbc opened a new issue, #26395: Please support environment variables in sharding.yml

cbcbbcbc opened a new issue, #26395:
URL: https://github.com/apache/shardingsphere/issues/26395

   (1) We need to override the variable definitions in sharding.yml according to the spring boot environment variables loading rules (same variable name in config/service-name.yml or config/application.yml), such as dataSources.x.jdbcUrl, dataSources.x.username;
   (2) We need to refer the ourside variables from sharding.ymml, for example: dataSources.x.jdbcUrl: ${someVar}


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] RaigorJiang commented on issue #26395: Please support environment variables in sharding.yml

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #26395:
URL: https://github.com/apache/shardingsphere/issues/26395#issuecomment-1596016070

   @cbcbbcbc 
   ShardingSphere does not have such a plan, do you have a feasible proposal?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] cbcbbcbc commented on issue #26395: Please support environment variables in sharding.yml

Posted by "cbcbbcbc (via GitHub)" <gi...@apache.org>.
cbcbbcbc commented on issue #26395:
URL: https://github.com/apache/shardingsphere/issues/26395#issuecomment-1625586780

   > @cbcbbcbc Have you solved it yet
   
   I wrote my own driver class to replace the placeholders in yaml then call the default driver class.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] RaigorJiang commented on issue #26395: Please support environment variables in sharding.yml

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #26395:
URL: https://github.com/apache/shardingsphere/issues/26395#issuecomment-1596469854

   @cbcbbcbc 
   There is an issue about Apollo, which may help you.
   https://github.com/apache/shardingsphere/issues/23388


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] 401error commented on issue #26395: Please support environment variables in sharding.yml

Posted by "401error (via GitHub)" <gi...@apache.org>.
401error commented on issue #26395:
URL: https://github.com/apache/shardingsphere/issues/26395#issuecomment-1625246166

   @cbcbbcbc Have you solved it yet


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] cbcbbcbc commented on issue #26395: Please support environment variables in sharding.yml

Posted by "cbcbbcbc (via GitHub)" <gi...@apache.org>.
cbcbbcbc commented on issue #26395:
URL: https://github.com/apache/shardingsphere/issues/26395#issuecomment-1596187856

   If you use Shardingsphere in a Spring Boot application, you will be aware of this requirement. Usually we use a configuration server such as Consul or Spring Cloud Config Server to save the production environment variables (DB username/password. etc.) those will override the ones in application.yml, the yml is packaged into a jar so we cannot replace it in production environment, this feature is the only one we can depend on.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] RaigorJiang closed issue #26395: Please support environment variables in sharding.yml

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #26395: Please support environment variables in sharding.yml
URL: https://github.com/apache/shardingsphere/issues/26395


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org