You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/03/01 12:22:59 UTC

[GitHub] ashb commented on a change in pull request #4777: [AIRFLOW-3918] Add ssh private-key support to git-sync for KubernetesExecutor

ashb commented on a change in pull request #4777: [AIRFLOW-3918] Add ssh private-key support to git-sync for KubernetesExecutor
URL: https://github.com/apache/airflow/pull/4777#discussion_r261583639
 
 

 ##########
 File path: airflow/contrib/kubernetes/worker_configuration.py
 ##########
 @@ -37,10 +35,14 @@ def __init__(self, kube_config):
 
         self.dags_volume_name = 'airflow-dags'
         self.logs_volume_name = 'airflow-logs'
+        self.git_sync_ssh_secret_volume_name = 'git-sync-ssh-key'
+        self.git_ssh_key_secret_key = 'gitSshKey'
+        self.git_sync_ssh_known_hosts_volume_name = 'git-sync-known-hosts'
+        self.git_ssh_known_hosts_configmap_key = 'known_hosts'
 
 Review comment:
   Oh, since these are hard-coded lets move them to "class properties":
   
   ```python
   class WorkerConfiguration(LoggingMixin):
       """Contains Kubernetes Airflow Worker configuration logic"""
   
       dags_volume_name = 'airflow-dags'
       logs_volume_name = 'airflow-logs'
       git_sync_ssh_secret_volume_name = 'git-sync-ssh-key'
       git_ssh_key_secret_key = 'gitSshKey'
       git_sync_ssh_known_hosts_volume_name = 'git-sync-known-hosts'
       git_ssh_known_hosts_configmap_key = 'known_hosts'
   
       def __init__(self, kube_config):
   ```
   
   Nothing else needs to change about how these are used.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services