Hugo Pedroso de Lima
08/27/2020, 11:18 AMjohann
08/27/2020, 2:14 PMjohann
08/27/2020, 2:15 PMdagster-k8s/config
tag that lets users pass in custom configuration to the Kubernetes Job
, Job
metadata, JobSpec
, PodSpec
, and PodTemplateSpec
metadata.
• This allows users to specify settings like eviction policy annotations and node affinities.
• Example:
@solid(
tags = {
'dagster-k8s/config': {
'container_config': {
'resources': {
'requests': { 'cpu': '250m', 'memory': '64Mi' },
'limits': { 'cpu': '500m', 'memory': '2560Mi' },
}
},
'pod_template_spec_metadata': {
'annotations': { "<http://cluster-autoscaler.kubernetes.io/safe-to-evict|cluster-autoscaler.kubernetes.io/safe-to-evict>": "true"}
},
'pod_spec_config': {
'affinity': {
'nodeAffinity': {
'requiredDuringSchedulingIgnoredDuringExecution': {
'nodeSelectorTerms': [{
'matchExpressions': [{
'key': '<http://beta.kubernetes.io/os|beta.kubernetes.io/os>', 'operator': 'In', 'values': ['windows', 'linux'],
}]
}]
}
}
}
},
},
},
)
def my_solid(context):
<http://context.log.info|context.log.info>('running')
johann
08/27/2020, 2:19 PMper pipeline configUnfortunately we currently just do this per solid. If you use the syntax on a pipeline tag, it will apply to the run coordinator pod. If you’d like to make a github issue for the feature that would be great!
Hugo Pedroso de Lima
08/27/2020, 5:28 PM