Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

git-sync on airflow does not support SSH authentication #18

Open
raam86 opened this issue Nov 5, 2018 · 7 comments
Open

git-sync on airflow does not support SSH authentication #18

raam86 opened this issue Nov 5, 2018 · 7 comments
Assignees

Comments

@raam86
Copy link

raam86 commented Nov 5, 2018

The current object only supports the username + password authentication method:

if sp.DAGs.Git.CredSecretRef != nil {

in order to fully support git-sync we need to 1. set GIT_SYNC_SSH to true and map a mounted volume that points to the ConfigMap: https://github.com/kubernetes/git-sync/blob/9ceb61f7947fbe463b1cc6e9ae5d719f5d8eebd2/docs/ssh.md#step-3-configure-git-sync-container

@barney-s
Copy link
Contributor

Would you have time to take this up ? @raam86
I can help you with the setup and tests

@raam86
Copy link
Author

raam86 commented Nov 21, 2018

After some more research I opted for GCS sidecar container, I think it's the best of all worlds. Basically lifted your setup into the helm/charts/incubator

@barney-s
Copy link
Contributor

Thanks. What did you mean by lifted you setup into helm/charts ?

If you are using both i would love to hear you feedback on helm/charts vs the operator.

@raam86
Copy link
Author

raam86 commented Dec 4, 2018

I initially used the operator and got quite excited but was stuck when trying to customize it. I specifically wanted to have the gcs sync as a sidecar instead of an init container and it was easier to do using the helm chart. Since I realized I am going to do work anyway I wanted it to be less google specific so I opted for the helm chart. the helm chart also has more users, more support and is more standard

@barney-s
Copy link
Contributor

barney-s commented Dec 4, 2018

Ah i see. GCS sync is a side-car. The default value of .spec.dags.gcs.once is false.
Which helm chart are you using ?

@raam86
Copy link
Author

raam86 commented Dec 6, 2018

The one that just became stable. You are definitely right about the defaults. I think that what actually happened was that I tried using git sync realized I can’t opted for the helm chart and eventually opted for gcs. Sorry about the confusion. But the underlying reason for continuing using the helm chart instead of the operator is that the helm chart uses standard and available kubernetes concepts while the operator is minting bew ones I don’t have lots of incentive to learn

@barney-s barney-s self-assigned this Jan 30, 2019
@dmateusp
Copy link

hi there, since this is the first Google result when looking for SSH auth for git-sync on Airflow just wanted to let you know I've been working on adding this to the Airflow project:

https://issues.apache.org/jira/browse/AIRFLOW-3918
apache/airflow#4777

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants