Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/_nebari/stages/kubernetes_services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ class JupyterHub(schema.Base):
overrides: Dict = {}


class DaskGateway(schema.Base):
enabled: bool = True


class IdleCuller(schema.Base):
terminal_cull_inactive_timeout: int = 15
terminal_cull_interval: int = 5
Expand Down Expand Up @@ -554,6 +558,7 @@ def handle_units(cls, value: Optional[str]) -> float:


class DaskGatewayInputVars(schema.Base):
dask_gateway_enabled: bool = Field(alias="dask-gateway-enabled")
dask_worker_image: ImageNameTag = Field(alias="dask-worker-image")
dask_gateway_profiles: Dict[str, Any] = Field(alias="dask-gateway-profiles")
cloud_provider: str = Field(alias="cloud-provider")
Expand Down Expand Up @@ -748,6 +753,7 @@ def _node_taint_tolerations(node_group_name: str) -> List[Toleration]:
)

dask_gateway_vars = DaskGatewayInputVars(
dask_gateway_enabled=self.config.dask_gateway.enabled,
dask_worker_image=_split_docker_image_name(
self.config.default_images.dask_worker
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# ===================== VARIABLES ====================
variable "dask-gateway-enabled" {
description = "Enable deployment of Dask Gateway service and resources"
type = bool
}

variable "dask-worker-image" {
description = "Dask worker image"
type = object({
Expand All @@ -23,6 +28,8 @@ variable "worker-taint-tolerations" {

# =================== RESOURCES =====================
module "dask-gateway" {
count = var.dask-gateway-enabled ? 1 : 0

source = "./modules/kubernetes/services/dask-gateway"

namespace = var.environment
Expand Down
Loading