https://dagster.io/ logo
Title
w

William Reed

08/17/2021, 9:18 PM
Seems like a silly question, but how do I specify the
serviceAccountName
for the job pods that get run via the K8sRunLauncher? I’ve tried a number of combinations in the
tags
portion of my pipeline/solids to no avail.
I’ve tried combos of “pod_spec_config”, “job_config”, “job_spec_config”, and “service_account_name”, “serviceAccountName”… what am I missing?
Here’s the usual stack trace:
TypeError: __init__() got an unexpected keyword argument 'service_account_name'
  File "/usr/local/lib/python3.7/site-packages/dagster_graphql/implementation/utils.py", line 29, in _fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/dagster_graphql/implementation/execution/launch_execution.py", line 16, in launch_pipeline_execution
    return _launch_pipeline_execution(graphene_info, execution_params)
  File "/usr/local/lib/python3.7/site-packages/dagster_graphql/implementation/execution/launch_execution.py", line 50, in _launch_pipeline_execution
    run = do_launch(graphene_info, execution_params, is_reexecuted)
  File "/usr/local/lib/python3.7/site-packages/dagster_graphql/implementation/execution/launch_execution.py", line 38, in do_launch
    workspace=graphene_info.context,
  File "/usr/local/lib/python3.7/site-packages/dagster/core/instance/__init__.py", line 1347, in submit_run
    SubmitRunContext(run, workspace=workspace)
  File "/usr/local/lib/python3.7/site-packages/dagster/core/run_coordinator/default_run_coordinator.py", line 32, in submit_run
    self._instance.launch_run(pipeline_run.run_id, context.workspace)
  File "/usr/local/lib/python3.7/site-packages/dagster/core/instance/__init__.py", line 1411, in launch_run
    self._run_launcher.launch_run(LaunchRunContext(pipeline_run=run, workspace=workspace))
  File "/usr/local/lib/python3.7/site-packages/dagster_k8s/launcher.py", line 282, in launch_run
    user_defined_k8s_config=user_defined_k8s_config,
  File "/usr/local/lib/python3.7/site-packages/dagster_k8s/job.py", line 558, in construct_dagster_k8s_job
    **job_spec_config,
j

johann

08/17/2021, 9:32 PM
Hi @William Reed - currently this is set in the dagster.yaml, on the run launcher config. It’s not currently possible to vary it per run
w

William Reed

08/17/2021, 9:37 PM
Ah that makes sense, thanks.