fix(tightly-coupled): pin k8s step IO manager to shared storage
This commit is contained in:
@@ -12,7 +12,7 @@ is the instance-level run launcher (see ``yaml/tightly-coupled/``).
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dagster import graph, in_process_executor, multiprocess_executor
|
||||
from dagster import fs_io_manager, graph, in_process_executor, multiprocess_executor
|
||||
from dagster_k8s import k8s_job_executor
|
||||
|
||||
from distributed_execution.ops import (
|
||||
@@ -28,15 +28,14 @@ COMMON_TAGS = {
|
||||
"business_operation": "DISTRIBUTED_EXECUTION_REFERENCE",
|
||||
}
|
||||
|
||||
# RWX PVC mounted into the run worker and every step pod. Set as the I/O manager
|
||||
# base_dir rather than via DAGSTER_HOME: the Dagster chart already injects
|
||||
# DAGSTER_HOME=/tmp/dagster and the earlier duplicate wins in the step pod.
|
||||
SHARED_IO_BASE_DIR = "/dagster/shared/distributed-execution/storage"
|
||||
|
||||
# Per-step pod shape. Only honoured by k8s_job_executor.
|
||||
STEP_K8S_CONFIG = {
|
||||
"container_config": {
|
||||
"env": [
|
||||
{
|
||||
"name": "DAGSTER_HOME",
|
||||
"value": "/dagster/shared/distributed-execution",
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"requests": {"cpu": "100m", "memory": "128Mi"},
|
||||
"limits": {"cpu": "500m", "memory": "512Mi"},
|
||||
@@ -104,6 +103,8 @@ tightly_coupled_k8s_job = distributed_execution_reference.to_job(
|
||||
# config `execution:` block is accepted and then silently discarded - which
|
||||
# also makes job_image and job_namespace impossible to supply at launch time.
|
||||
executor_def=k8s_job_executor,
|
||||
# Steps run in separate pods, so step outputs have to land on shared storage.
|
||||
resource_defs={"io_manager": fs_io_manager.configured({"base_dir": SHARED_IO_BASE_DIR})},
|
||||
config={
|
||||
"execution": {
|
||||
"config": {
|
||||
|
||||
Reference in New Issue
Block a user