Changeset View
Changeset View
Standalone View
Standalone View
python_modules/libraries/dagster-k8s/dagster_k8s/launcher.py
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | class K8sRunLauncher(RunLauncher, ConfigurableClass): | ||||
@classmethod | @classmethod | ||||
def config_type(cls): | def config_type(cls): | ||||
"""Include all arguments required for DagsterK8sJobConfig along with additional arguments | """Include all arguments required for DagsterK8sJobConfig along with additional arguments | ||||
needed for the RunLauncher itself. | needed for the RunLauncher itself. | ||||
""" | """ | ||||
job_cfg = DagsterK8sJobConfig.config_type() | job_cfg = DagsterK8sJobConfig.config_type() | ||||
run_launcher_extra_cfg = { | run_launcher_extra_cfg = { | ||||
"job_namespace": StringSource, | "job_namespace": Field(StringSource, is_required=False, default_value="default"), | ||||
catherinewu: I think these should be configurable via the helm chart. Also, would be good to document that… | |||||
"load_incluster_config": Field(bool, is_required=False, default_value=True), | "load_incluster_config": Field(bool, is_required=False, default_value=True), | ||||
"kubeconfig_file": Field(Noneable(str), is_required=False, default_value=None), | "kubeconfig_file": Field(Noneable(str), is_required=False, default_value=None), | ||||
} | } | ||||
return merge_dicts(job_cfg, run_launcher_extra_cfg) | return merge_dicts(job_cfg, run_launcher_extra_cfg) | ||||
@classmethod | @classmethod | ||||
def from_config_value(cls, inst_data, config_value): | def from_config_value(cls, inst_data, config_value): | ||||
return cls(inst_data=inst_data, **config_value) | return cls(inst_data=inst_data, **config_value) | ||||
▲ Show 20 Lines • Show All 200 Lines • Show Last 20 Lines |
I think these should be configurable via the helm chart. Also, would be good to document that setting celery.enabled: false will deploy the k8s run launcher. We should probably have a page for this in the docs, before we introduce the celeryk8s deployment here (https://docs.dagster.io/deploying/k8s_part1)