With AutoDevOps can I set a value for an environment variable at deploy (without using custom chart.yml)

I am using AutoDevops with our company’s gitlab instance on version 14.9.2.
In our release process we have 4 different environments that we deploy builds to (dev,uat,staging,prod). I don’t want to get into why we do that, let’s just say we have our reasons.

I am trying to achieve this general approach for my ASP.Net Core V6 service:

  1. Add versions of appsettings.[ ASPNETCORE_ENVIRONMENT ].json files that contain settings “per environment”
  2. When the docker image is built, all these settings files are included in the image (I DO NOT set the value for ASPNETCORE_ENVIRONMENT in the image)
  3. When the container is created in the k8s cluster I want to set the value for ASPNETCORE_ENVIRONMENT
  4. When code runs in container it automatically loads the correct appsettings.[ ASPNETCORE_ENVIRONMENT ].json file for the environment because I set the value in step 3

Currently I have done some customizations for the .gitlab-ci.yml but I have not created a custom Helm chart because it seemed like a lot of stuff to figure out since it replaces the default chart instead of overrides values. So I am trying to avoid implementing a custom chart.

I see I can run a command like

helm upgrade --install my-test-app-release . \
  --namespace=local \
  --set test-app-api.image.tag="0.1.0" \

but I am concerned that will do the deploy when all I want to do is set the value.

I am not necessarily mandated to use the process I outlined above. It is a work in progress and I am open to other ideas if you have any.

Thank you,
Troy Barnes

Looking for feedback here. If anyone is confused by my post please let me know so I can make it clearer.