dask / dask-gateway

A multi-tenant server for securely deploying and managing Dask clusters.
https://gateway.dask.org/
BSD 3-Clause "New" or "Revised" License
136 stars 88 forks source link

How to Change Dashboard Address for Dask Gateway? #361

Open rileyhun opened 3 years ago

rileyhun commented 3 years ago

Hello,

We are using an internal TCP load balancer to expose the traefik proxy for security purposes. Our users are able to create a client connection to the cluster generated through Dask Gateway just fine. But because we are now using an internal load balancer on a private VPC, the link to the dashboard is no longer accessible. How do we expose this dashboard link? Would really welcome and appreciate some advice on this.

Thanks,

Riley

rileyhun commented 3 years ago

I tried changing the public_address in the helm config to an external load balancer IP:

i.e.

gateway:
  public-address: <IP_ADDRESS>

Then, to re-deploy:

helm upgrade --install \ 
   --namespace $NAMESPACE \
   --version $VERSION \
   --values dask/config.yaml \    
   $RELEASE    
   daskgateway/dask-gateway

But the dashboard is still using the private IP address of the internal TCP load balancer.

celestial-nets commented 1 year ago

Bump on this

consideRatio commented 1 year ago

To think about this, let's acknowledge that dask-gateway is a server and a client, and a helm chart to deploy the server part.

To adjust the dashboard link is a client side configuration I think. That means that you may need to adjust things where the dask-gateway client is run, not what values you pass to helm during helm upgrade etc.

I think this configuration is relevant to look at for a reference. When c.KubeSpawner.environment is configured here, it is in practice setting environment variables where the dask-gateway client will be running.

        # Internal address to connect to the Dask Gateway.
        c.KubeSpawner.environment.setdefault("DASK_GATEWAY__ADDRESS", gateway_address)
        # Internal address for the Dask Gateway proxy.
        c.KubeSpawner.environment.setdefault("DASK_GATEWAY__PROXY_ADDRESS", "gateway://traefik-{}-dask-gateway.{}:80".format(release_name, release_namespace))
        # Relative address for the dashboard link.
        c.KubeSpawner.environment.setdefault("DASK_GATEWAY__PUBLIC_ADDRESS", "/services/dask-gateway/")

You can provide configuration for dask-gateway the client via a configuration file as well, the environment variables above map to configuration file settings also.