优化
This commit is contained in:
@@ -3,6 +3,7 @@ from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import Kubernete
|
||||
import pendulum
|
||||
from airflow import DAG
|
||||
from docker.types import Mount
|
||||
from kubernetes.client import models as k8s
|
||||
|
||||
with DAG(
|
||||
dag_id="comm_add_dag",
|
||||
@@ -25,11 +26,13 @@ with DAG(
|
||||
production_task = KubernetesPodOperator(namespace='airflow-plus',
|
||||
# image="my-production-job:release-1.0.1", <-- old release
|
||||
image="192.168.0.19:9012/comm-add:1.0.1",
|
||||
image_pull_secrets=[k8s.V1LocalObjectReference("nexus-registry-secret")],
|
||||
cmds=["Python", "-c"],
|
||||
arguments=["print('hello world')"],
|
||||
name="fail",
|
||||
task_id="failing-task",
|
||||
get_logs=True
|
||||
get_logs=True,
|
||||
docker_conn_id="docker_repo"
|
||||
)
|
||||
|
||||
production_task
|
||||
|
||||
Reference in New Issue
Block a user