Charts: [stable/airflow] issue with private git repo

Created on 6 Sep 2019  路  3Comments  路  Source: helm/charts

Describe the bug
I'm trying to use a private repo that containing my dags. I created the secret but when I exec the command helm upgrade... some pods return the error "Back-off restarting failed container"

Version of Helm and Kubernetes
Helm: v2.14.1
Kubernetes: v1.13

Which chart
stable/airflow

What happened
As the Readme mentions I created a secret

kubectl create secret generic my-git-sescet --from-file=id_rsa=/home/username/.ssh/id_rsa --from-file=known_hosts=/home/username/.ssh/known_hosts --from-file=id_rsa.pub=/home/username/.ssh/id_rsa.pub

and added in the values.yaml file the git options

##
## Configure DAGs deployment and update
dags:
  ##
  ## mount path for persistent volume.
  ## Note that this location is referred to in airflow.cfg, so if you change it, you must update airflow.cfg accordingly.
  path: /usr/local/airflow/dags
  ##
  ## Set to True to prevent pickling DAGs from scheduler to workers
  doNotPickle: false
  ##
  ## Configure Git repository to fetch DAGs
  git:
    ##
    ## url to clone the git repository
    url: https://github.com/myrepo/test-repo
    ##
    ## branch name, tag or sha1 to reset to
    ref: 0518b3d46adb956cbdc4ca78b42757b6e4642a04
    ## pre-created secret with key, key.pub and known_hosts file for private repos
    secret: my-git-sescret
  initContainer:
    ## Fetch the source code when the pods starts
    enabled: true
    ## Image for the init container (any image with git will do)
    image:
      ## docker-airflow image
      repository: alpine/git
      ## image tag
      tag: 1.0.7
      ## Image pull policy
      ## values: Always or IfNotPresent
      pullPolicy: IfNotPresent
    ## install requirements.txt dependencies automatically
    installRequirements: true

after that I executed the helm upgrade command

helm upgrade -f ./airflow/values.yaml realese-name ./airflow

What you expected to happen

Anything else we need to know
with a public git repo the the deployment works well. I am currently using eks version eks.

Most helpful comment

I had the same issue, naming the key id_rsa instead of a custom name solves the problem for me. The git clone script does not support a specific key keyname as far as I saw.

All 3 comments

After updated the helm repo, the airflow chart with private git repo works perfectly. I'm going to close the issue

I had the same issue, naming the key id_rsa instead of a custom name solves the problem for me. The git clone script does not support a specific key keyname as far as I saw.

how do you update the helm repo?

Was this page helpful?
0 / 5 - 0 ratings