Solaris Wang
04/13/2023, 4:14 PMSolaris Wang
04/13/2023, 4:17 PMjob
level via execute_k8s_job
not ideal or convenient…since we group jobs based on repo, and each repo’s jobs should use the same service accountSolaris Wang
04/13/2023, 4:19 PMresources
are instantiated on the user deployment, and for some of that code to be executed with the right privileges, i’d want to specify the corresponding service account per container and not globally (in the helm chart)Solaris Wang
04/13/2023, 4:34 PMdaniel
04/14/2023, 3:05 PMlocation_dependant_service_account_name = # function that checks env vars to determine what to use
@job(tags="dagster-k8s/config": {"pod_spec_config": {"service_account_name": location_dependant_service_account_name}}
using the tags described here: https://docs.dagster.io/deployment/guides/kubernetes/customizing-your-deployment#per-job-or-per-op-kubernetes-configurationSolaris Wang
04/19/2023, 9:40 PMdagster-k8s/config:{"pod_spec_config": { "serviceAccountName": "your_k8s_service_account" }, }
in dagit, add it as a tag in your run configuration/runlauncher
more documentation here and here (search for podspec)