Order of precedence of Helm files in ASP.NET 5 WebApi

So I am working on an ASP.NET 5 based WebApi and the deploy is realised through Helm with numerous of .yaml files.

Since this is a new approach for me I need to clarify few things.

Basically I have this structure:

  • The appsettings.json file.
  • The MyService/Charts/MyService-Service/templates .helmignore Chart.yaml values.yamls
  • MyService/Environments/dev.yaml test.yaml production.yaml

Where, the Environments folder hold three different files each of which contains specific data for the corresponding environment.

Currently I have 3 questions:

  • How can I check what will be produced if I use the dev.yaml, or test.yaml, or production.yaml. A colleague of mine showed me a command in powershell which output was a long configuration with the data from the file I want (sorry that I'm not using the most correct terms in place, I'm still learing)
  • What is the order of preference. Based on what I've seen so far I can get data for the same key from three different places - appsetings.json, values.yaml, dev/test/production.yaml (please correct if I'm wrong. The other part of the Heml structure seems standard), but I wonder if I have the same key defined everywhere how is decided what will be the final value?
  • How to check for unnecessary definitions. Again, a colleague of mine take a quick look at my appsettings.json and some of the yaml files and said that I don't need some of the configurations that are there. Since the service is already deployable on dev environment and I don't get any error/warnings or whatever I thought that I've done it just right, but if I really have some unused parts is there a way to detect them since just expecting the file doesn't give me much of a clue?

I am not sure if I've provided all the needed information, so please ask for clarification if something is unclear or missing.