armandleopold commented on issue #13680:
URL: https://github.com/apache/airflow/issues/13680#issuecomment-767681365
I had to create a pod template file :
`dev-airflow-worker.yaml`
```yaml
apiVersion: v1
kind: Pod
metadata:
name: dummy-name
spec:
containers:
- env:
- name: AIRFLOW__CORE__DAGS_FOLDER
value: /opt/bitnami/airflow/dags/git-airflow-dags/repo/
- name: AIRFLOW__CORE__EXECUTOR
value: LocalExecutor
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
value: xxxxxxxxxxxxxx
- name: AIRFLOW__CORE__FERNET_KEY
value: xxxxxxxxxxxxxxx
image: bitnami/airflow-worker:2.0.0-debian-10-r5
name: base
volumeMounts:
- mountPath: /opt/bitnami/airflow/dags/git-airflow-dags
name: airflow-dags
readOnly: true
subPath: ./repo/
initContainers:
- env:
- name: GIT_SYNC_REPO
value: https://gitlab..........................
- name: GIT_SYNC_BRANCH
value: dev
- name: GIT_SYNC_ROOT
value: /dags-airflow-dags
- name: GIT_SYNC_DEST
value: repo
- name: GIT_SYNC_DEPTH
value: "1"
- name: GIT_SYNC_ONE_TIME
value: "true"
- name: GIT_SYNC_REV
- name: GIT_SYNC_USERNAME
value: aleopold
- name: GIT_SYNC_PASSWORD
value: xxxxxxxxxxxxxxxxxxxxxxxxxxx
- name: GIT_KNOWN_HOSTS
value: "false"
image: k8s.gcr.io/git-sync:v3.1.1
imagePullPolicy: IfNotPresent
name: git-sync-clone
securityContext:
runAsUser: 65533
volumeMounts:
- mountPath: /dags-airflow-dags
name: airflow-dags
securityContext:
fsGroup: 50000
runAsUser: 50000
serviceAccount: airflow-deployement
serviceAccountName: airflow-deployement
volumes:
- name: airflow-dags
```
And in the helm-chart's `values.yaml`
[https://artifacthub.io/packages/helm/bitnami/airflow](https://artifacthub.io/packages/helm/bitnami/airflow)
```yaml
airflow:
extraEnvVars:
- name: AIRFLOW_EXECUTOR
value: "KubernetesExecutor"
- name: AIRFLOW__KUBERNETES__POD_TEMPLATE_FILE
value:
"/opt/bitnami/airflow/dags/git-airflow-dags/dev-airflow-worker.yaml"
- name: AIRFLOW__KUBERNETES__FS_GROUP
value: "50000"
```
hope it helps
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]