Billy McMonagle
01/27/2021, 2:21 AMKubernetesRun
... is there a direct way to set metadata labels on the flow run job/pod, or is a custom job template necessary? I'm specifically interested in tagging my jobs so that datadog is able to collect metrics.job_template = """
apiVersion: batch/v1
kind: Job
metadata:
name: prefect-job
labels:
<http://tags.datadoghq.com/service|tags.datadoghq.com/service>: xxxxxxx
spec:
template:
metadata:
<http://tags.datadoghq.com/service|tags.datadoghq.com/service>: xxxxxxx
spec:
containers:
- name: flow
"""
environment_variables = {"FOO": "BAR"}
service_account_name = "my-service-account"
run_config = KubernetesRun(
env=environment_variables, service_account_name=service_account_name, job_template=job_template
)
Jim Crist-Harif
01/27/2021, 3:03 AMKubernetesRun
object (as you've done), or on the agent by passing in --job-template
(which will be used by default for all flows run by that agent).Billy McMonagle
01/27/2021, 3:10 AMChris White
Marvin
01/27/2021, 4:50 PM