Duckling : set up duckling url as an env var in config.yml

Hello rasa community! I am using Kubernetes and ansible to set up the configuration for rasa bot and i want to add duckling url as a env var in the file config.yml since this url is different in both Kubernetes and Ansible. to explain more , in ansible configuration i have :

  • services

    rasa_service: environment: - duckling_url=http://duckling_ansible:8000

and in kubernetes cinfiguration i have :

  • extraEnvs:
    • name: duckling_url value: “http://duckling_kubernetes:8000”

in the file config.yml i added the url as a env var :

  • name: “DucklingEntityExtractor” url: ${duckling_url}

the problem is that it does not seem to work , i get an error “ERROR rasa.core.channels.rest - An exception occured while handling user message (message)” Can anyone explain why this error occure and how we can use env var in config.yml using ansible and kubernetes ? thank you