That’s way more logic than I’d try to put in a helmfile. I recommend putting that in a script of some sort and setting a couple state variables when it calls helmfile. Some pseudocode:
I’ll call your apps A and B:
if ENV_DEPLOY_APP_A == true || ( env in (dev, qa) && CONFIGMAP_DEPLOY_APP_A == true) {
DEPLOY_APP_A=true
DEPLOY_APP_B=false
else
DEPLOY_APP_A=false
DEPLOY_APP_B=true
helmfile apply --state-values-set deployAppA=${DEPLOY_APP_A} --state-values-set deployAppB=${DEPLOY_APP_B}
In your helmfile for app a
installedTemplate: {{ eq .StateValues.deployAppA, "true" }}
In your helmfile for app b:
installedTemplate: {{ eq .StateValues.deployAppB, "true" }}