-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AIRFLOW-3918] Add ssh private-key support to git-sync for KubernetesExecutor #4777
[AIRFLOW-3918] Add ssh private-key support to git-sync for KubernetesExecutor #4777
Conversation
template Change default airflow config to have keys for SSH authentication (mutually exclusive of user authentication) Update git-sync version to the latest, current version did not support SSH authentication environment variables
Tests that the resulting configs are valid and that security_context is correctly added when using make_pod
Security context was required to read the mounted SSH key for git-sync SSH authentication
Codecov Report
@@ Coverage Diff @@
## master #4777 +/- ##
==========================================
- Coverage 74.44% 74.38% -0.07%
==========================================
Files 450 450
Lines 28974 29021 +47
==========================================
+ Hits 21571 21587 +16
- Misses 7403 7434 +31
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #4777 +/- ##
==========================================
+ Coverage 74.44% 74.47% +0.03%
==========================================
Files 450 450
Lines 28970 28994 +24
==========================================
+ Hits 21567 21594 +27
+ Misses 7403 7400 -3
Continue to review full report at Codecov.
|
0009d23
to
1e96986
Compare
Hardcode Kubernetes secret key name and known hosts configmap key name Add example of configmap + Kubernetes secret snippet in config template
1e96986
to
d9de91a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor changes - some of the "suggestions" need more than just the one line requested, but github doesn't allow multi line suggestions.
Looking good. Please ping me again once you've done the changes (in Slack is better, my inbox is a mess right now)
Move hardcoded Class instance attributes to Class properties Use octal to represent file permissions Move known hosts configuration to allow usage with username/password Make ConfigurationException test more specific Remove print and extra parenthesis Rename init_volumes_and_mounts to _get_volumes_and_mounts for clarity Add tests for username/password and known_hosts configuration
I'll mark this for 10.3 - and we'll attempt to cherry-pick it in to the release branch. |
…Executor (#4777) Add configuration for git SSH auth and update git-sync version in template (mutually exclusive of user authentication). Update git-sync version to the latest, current version did not support SSH authentication environment variables Security context was required to read the mounted SSH key for git-sync SSH authentication Add example of configmap + Kubernetes secret snippet in config template
…Executor (apache#4777) Add configuration for git SSH auth and update git-sync version in template (mutually exclusive of user authentication). Update git-sync version to the latest, current version did not support SSH authentication environment variables Security context was required to read the mounted SSH key for git-sync SSH authentication Add example of configmap + Kubernetes secret snippet in config template
…Executor (apache#4777) Add configuration for git SSH auth and update git-sync version in template (mutually exclusive of user authentication). Update git-sync version to the latest, current version did not support SSH authentication environment variables Security context was required to read the mounted SSH key for git-sync SSH authentication Add example of configmap + Kubernetes secret snippet in config template
Make sure you have checked all steps below.
Jira
https://issues.apache.org/jira/browse/AIRFLOW-3918
Description
This PR adds support for Git Sync authentication through SSH key (e.g. a GitHub deployment read-only key)
Tests
Additionally tested at HBC on our cluster
Commits
Documentation
Code Quality