InseeFrLab/onyxia-api

Support HTTP proxy

Closed this issue · 2 comments

Some onyxia installations are behind a corporate proxy.
We should add support for http proxy for the following usecases :

  • Catalogs retrieval
  • Marathon
  • Kubernetes

Support of Java standard proxy properties (as defined here : https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html) has been added to the Helm wrapper by #57.
I tested that Catalogs retrieval (spring resourceloader), Marathon (mesosphere library and our custom implementation that uses okhttp) and Kubernetes (fabric8 client) all honor the standard proxy properties.

So Onyxia now fully supports proxy via command line -D properties !

But most installations of Onyxia are running on Docker so we should support env variables (and local properties for local development).

The next and last step is to inject properties (using System.setProperty) at startup based on spring resolved values (@Value), just as we do for other configurations.
Warning : this should be done before other startup initializations as some of them (e.g : initial catalogs loading) are impacted by the proxy.

Fixed by #60