kubectl create secret generic git-ssh-key \
--from-file=ssh-privatekey=$HOME/.ssh/id_rsa \
--type=kubernetes.io/ssh-auth -n airflow
helm upgrade --install airflow apache-airflow/airflow \
--set dags.persistence.enabled=true \
--set dags.gitSync.enabled=true
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
base64 <my-private-ssh-key> -w 0 > temp.txt
helm repo add apache-airflow https://airflow.apache.org
helm upgrade --install airflow apache-airflow/airflow --namespace airflow --create-namespace
helm show values apache-airflow/airflow > airflow/value.yaml
# Git sync
dags:
mountPath: ~
persistence:
annotations: {}
enabled: false
size: 1Gi
storageClassName:
accessMode: ReadWriteOnce
existingClaim:
subPath: ~
gitSync:
enabled: true
# git repo clone url
# ssh example: git@github.com:apache/airflow.git
# https example: https://github.com/apache/airflow.git
repo: git@<git 주소>:<git 프로젝트>.git
branch: next
rev: HEAD
ref: next
depth: 1
maxFailures: 0
# git repot 내 DAG path 지정
subPath: "dags"
# 위에서 생성한 secret 지정
sshKeySecret: git-ssh-key
period: 5s
wait: ~
envFrom: ~
containerName: git-sync
uid: 65533
securityContext: {}
securityContexts:
container: {}
containerLifecycleHooks: {}
extraVolumeMounts: []
env: []
resources: {}
helm install
대신 helm update
helm install airflow-prod apache-airflow/airflow \
--namespace airflow \
--create-namespace \
-f airflow/values.yaml