【发布时间】:2021-01-24 10:12:11
【问题描述】:
我是 Airflow 和 Kubernetes 的新手。我正在尝试在 Kubernetes 中使用 apache Airflow。
为了部署它,我使用了这个图表:https://github.com/apache/airflow/tree/master/chart。
我想将我的 dags 上传到我的 github 存储库中,所以:
gitSync:
enabled: true
# git repo clone url
# ssh examples ssh://git@github.com/apache/airflow.git
# git@github.com:apache/airflow.git
# https example: https://github.com/apache/airflow.git
repo: https://github.com/mygithubrepository.git
branch: master
rev: HEAD
root: "/git"
dest: "repo"
depth: 1
# the number of consecutive failures allowed before aborting
maxFailures: 0
# subpath within the repo where dags are located
# should be "" if dags are at repo root
subPath: ""
然后我看到要使用私有 github 存储库,我必须创建一个在 value.yml 文件中指定的秘密:
# if your repo needs a user name password
# you can load them to a k8s secret like the one below
# ---
# apiVersion: v1
# kind: Secret
# metadata:
# name: git-credentials
# data:
# GIT_SYNC_USERNAME: <base64_encoded_git_username>
# GIT_SYNC_PASSWORD: <base64_encoded_git_password>
# and specify the name of the secret below
#credentialsSecret: git-credentials
我正在创造秘密:
apiVersion: v1
data:
GIT_SYNC_USERNAME: bXluYW1l
GIT_SYNC_PASSWORD: bXl0b2tlbg==
kind: Secret
metadata:
name: git-credentials
namespace: default
然后我使用 value.yml 文件中的秘密名称:
repo: https://github.com/mygithubrepository.git
branch: master
rev: HEAD
root: "/git"
dest: "repo"
depth: 1
# the number of consecutive failures allowed before aborting
maxFailures: 0
# subpath within the repo where dags are located
# should be "" if dags are at repo root
subPath: ""
# if your repo needs a user name password
# you can load them to a k8s secret like the one below
# ---
# apiVersion: v1
# kind: Secret
# metadata:
# name: git-credentials
# data:
# GIT_SYNC_USERNAME: <base64_encoded_git_username>
# GIT_SYNC_PASSWORD: <base64_encoded_git_password>
# and specify the name of the secret below
credentialsSecret: git-credentials
但似乎无法正常工作。
【问题讨论】:
-
您得到的确切错误信息是什么?
标签: kubernetes airflow kubernetes-helm