Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-2611

Fix wrong dag volume mount path for kubernetes executor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 1.10.0, 2.0.0
    • Component/s: contrib
    • Labels:
      None

      Description

      If I set both dags_volume_claim and git_subpath, well, I won't get the volume mount path that I want (see code):

      volume_mounts = [{
       'name': dags_volume_name,
       'mountPath': os.path.join(
       self.worker_airflow_dags,
       self.kube_config.git_subpath
       ),
       'readOnly': True
      }, {
       'name': logs_volume_name,
       'mountPath': self.worker_airflow_logs
      }]
      

      There are two way of syncing dags, pvc and git-sync, I think if set both, the priority of pvc should higher than git-sync, because some beginers use the template config file at the beginning (like this), when they want to use pvc to mount dags, they may don't know they should remove the  git_subpath config. So I think when dags_volume_claim is set, the mountPath shuold not join the git_subpath

        Attachments

          Activity

            People

            • Assignee:
              imroc roc chan
              Reporter:
              imroc roc chan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: