canonical / craft-application

The basis for *craft applications
https://canonical-craft-application.readthedocs-hosted.com/en/latest
GNU Lesser General Public License v3.0
5 stars 7 forks source link

feat: pass environment variables to the instance. #260

Closed lengau closed 3 months ago

lengau commented 3 months ago

This provides two things:

  1. Forwards proxy variables to the provider.
  2. Provides an example for how an application can forward additional variables.

Fixes #258 (CRAFT-2579)


syu-w commented 3 months ago

Should we add a function that allows return extra environment variables for pass to the instance?

lengau commented 3 months ago

@syu-w My original implementation actually had something like that - it added a forward_environment_variables attribute to the AppMetadata. I'm happy to re-add that in another PR, but I removed it for the timebeing because it's out of scope and I didn't want to muddy the waters.