nishanil / ondotnet

Demos used in On.NET show
26 stars 17 forks source link

Redis connection #1

Open eliassal opened 3 years ago

eliassal commented 3 years ago

Hi Nich, the session on live .Net about microservices was very interesting and informative. A quesion, in tye.yaml, for redis connectionString: "${host}:${port}" How do they get populated during runtime? I noticed that in the startup of backend there is var con = Configuration.Getconnectionstring("redis");

but there is no key in the app setings

Thanks for your help

nishanil commented 3 years ago

Thanks @eliassal These configuration will be part of the Environment variables that are set during deployment. These are configured in tye.yaml for local deployment. In Kubernetes, Tye uses Kubernetes secrets to store connection information about dependencies like redis. This doc may be helpful in understanding it: https://github.com/dotnet/tye/blob/master/docs/tutorials/hello-tye/02_add_redis.md