0

All I have .net core api that I put into Rancher. I added the secrets to the secrets section of the project. The .net core api is still reading the appsettings.json which has empty settings. How do you set up rancher to override the appsettings.json file?

I have even tried using the configmap but nothing seems to be working and the rancher experts at my company are at a loss as well.

  • try environment variables. – Daniel A. White Jul 14 '23 at 15:52
  • @DanielA.White please provide more info, where do i find environment variables in Rancher. – jamesgus Jul 14 '23 at 15:56
  • https://stackoverflow.com/questions/42921032/how-to-manage-environment-variables-in-rancher#:~:text=Environment%20variables%20can%20be%20defined,across%20services%2C%20but%20not%20edited.&text=Depending%20on%20where%20the%20tracker_ip,as%20part%20of%20the%20stack. – Daniel A. White Jul 14 '23 at 15:58
  • You can find the documentation for asp.net configuration providers [here](https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration#configuration-providers). Command line arguments may be an alternative option apart from environment variables. – McFlurry Jul 15 '23 at 00:25
  • Maybe my explanation was a bit misleading. The secrets/configuration is in Rancher not in the project. I am trying to use those configurations in order to move between environments, since it doesn't seem you have direct access to the image in deployment to Rancher. – jamesgus Jul 19 '23 at 17:19

0 Answers0