Closed TomAugspurger closed 4 years ago
cc @scottyhq.
This LGTM, for your reference, this is my setup.
I would consider adding traefik.service.type: ClusterIP
, because by default it is a LoadBalancer that exposes it with a public IP, but you access it through JupyterHub's configurable proxy and /services/dask-gateway anyhow, which means you use that entrypoint to the k8s cluster rather than directly through the dask-gateways traefik service.
# my sensitive values redacted
gateway:
proxyToken: redacted
auth:
type: jupyterhub
jupyterhub:
# A JupyterHub api token for dask-gateway to use. See
# https://gateway.dask.org/install-kube.html#authenticating-with-jupyterhub.
apiToken: redacted
# JupyterHub's api url. Inferred from JupyterHub's service name if running
# in the same namespace.
apiUrl: http://hub.jupyterhub:8081/hub/api
# my non-sensitive values.yaml
gateway:
loglevel: DEBUG
resources: {}
# Path prefix to serve dask-gateway api requests under
# This prefix will be added to all routes the gateway manages
# in the traefik proxy.
prefix: /services/dask-gateway
backend:
# The image to use for both schedulers and workers.
image:
name: <our jupyterhub user environment image>
tag: <...>
# A mapping of environment variables to set for both schedulers and workers.
environment: null
scheduler:
# Any extra configuration for the worker pod. Sets
# `c.KubeClusterConfig.worker_extra_pod_config`.
extraPodConfig:
tolerations:
- key: "hub.jupyter.org_dedicated"
operator: "Equal"
value: "user"
effect: "NoSchedule"
nodeSelector:
hub.jupyter.org/node-purpose: user
# Any extra configuration for the worker container. Sets
# `c.KubeClusterConfig.worker_extra_container_config`.
extraContainerConfig: {}
cores:
request: 0.05
limit: 1
memory:
request: 0.25G
limit: 2G
worker:
# Any extra configuration for the worker pod. Sets
# `c.KubeClusterConfig.worker_extra_pod_config`.
extraPodConfig:
tolerations:
- key: "dedicated"
operator: "Equal"
value: "dask-workers"
effect: "NoSchedule"
nodeSelector:
node-purpose: dask-workers
# Any extra configuration for the worker container. Sets
# `c.KubeClusterConfig.worker_extra_container_config`.
extraContainerConfig: {}
cores:
request: 0.1
limit: 1
memory:
request: 3.45G
limit: 3.45G
# ref: https://gateway.dask.org/install-kube.html#using-extraconfig
extraConfig:
user-resource-limits: |
# ref: https://gateway.dask.org/resource-limits.html
c.UserLimits.max_clusters = 1
c.UserLimits.max_cores = 32
c.UserLimits.max_memory = str(3.45 * c.UserLimits.max_cores) + " GB"
cluster-options: |
# ref: https://gateway.dask.org/cluster-options.html
from dask_gateway_server.options import Options, Integer, Float, String
def option_handler(options):
return {
"worker_cores": options.worker_cores,
"worker_memory": "%fG" % options.worker_memory,
}
c.Backend.cluster_options = Options(
Integer("worker_cores", 1, min=1, max=4, label="Worker Cores"),
Float("worker_memory", 3.45, min=1, max=13.8, label="Worker Memory (GiB)"),
handler=option_handler,
)
# Configuration for the gateway controller
controller:
loglevel: DEBUG
resources: {}
# Configuration for the traefik proxy
traefik:
loglevel: DEBUG
resources: {}
# Additional configuration for the traefik service
service:
# Let's only provide access to the proxy of traffic internally in the k8s
# cluster, and if we want external access, we can add an ingress resource.
type: ClusterIP
Going to merge this and attempt to update to the staging hubs.
Updates the requriement and configuration.
Some additional cleanup of the config to move common settings from binder & the hubs here.