KubernetesExecutor
. AIRFLOW__KUBERNETES__IN_CLUSTER: 'false'
AIRFLOW__KUBERNETES__CONFIG_FILE: ~/.kube/config
AIRFLOW__KUBERNETES__NAMESPACE: airflow
AIRFLOW__KUBERNETES__POD_TEMPLATE_FILE: /home/airflow/pod_template.yaml
apiVersion: v1
kind: Pod
metadata:
name: dummy-name
spec:
initContainers:
- name: git-sync
image: "[repo]/git-sync:v3.1.6"
env:
- name: GIT_SYNC_REPO
value: ""
- name: GIT_SYNC_ROOT
value: "/tmp/git"
- name: GIT_SYNC_DEPTH
value: "1"
- name: GIT_SYNC_WAIT
value: "60"
- name: GIT_SYNC_USERNAME
value: [username]
- name: GIT_SYNC_PASSWORD
value: [password]
volumeMounts:
- name: airflow-dags
mountPath: /tmp/git
containers:
- args: []
command: []
env:
- name: AIRFLOW__CORE__EXECUTOR
value: LocalExecutor
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
value: [conn str]
- name: AIRFLOW__CORE__DAGS_FOLDER
value: [dag folder]
envFrom: []
image: "[repo]/airflow:2.1.3"
imagePullPolicy: IfNotPresent
name: base
ports: []
volumeMounts:
- mountPath: "/opt/airflow/logs"
name: airflow-logs
- mountPath: /opt/airflow/dags
name: airflow-dags
readOnly: false
hostNetwork: false
restartPolicy: Never
securityContext:
runAsUser: 50000
fsGroup: 50000
nodeSelector:
{}
affinity:
{}
tolerations:
[]
volumes:
- name: airflow-dags
emptyDir: {}
- emptyDir: {}
name: airflow-logs
- configMap:
name: RELEASE-NAME-airflow-config
name: airflow-config
- configMap:
name: RELEASE-NAME-airflow-config
name: airflow-local-settings
If I specify a image of a dag's operator with pod_override
, it works. But that is not what I want. I want to set a default image by config. How could I do that?
(Stackoverflow wants more words...blahblah... bl...ah... blah....)