ephraimbuddy commented on a change in pull request #15937:
URL: https://github.com/apache/airflow/pull/15937#discussion_r635212429
##########
File path: docs/helm-chart/manage-dags-files.rst
##########
@@ -136,3 +137,65 @@ In this approach, Airflow will read the DAGs from a PVC
which has ``ReadOnlyMany
--set dags.persistence.enabled=true \
--set dags.persistence.existingClaim=my-volume-claim
--set dags.gitSync.enabled=false
+
+Mounting DAGs from a private Github repo using Git-Sync sidecar
+---------------------------------------------------------------
+Create a private repo on Github if you have not created one already.
+
+Then create your ssh keys:
+
+.. code-block:: bash
+
+ ssh-keygen -t rsa -b 4096 -C "[email protected]"
+
+and add the public key to your private repo (under ``Settings > Deploy keys``).
+
+Now, you have to create a Kubernetes Secret object with which the Git-Sync
sidecar will authenticate when
+fetching or syncing your DAGs from your private Github repo.
+
+You have to convert the private ssh key to a base64. You can convert the
private ssh key file like so:
+
+.. code-block:: bash
+
+ base64 <my-private-ssh-key> -w 0 > temp.txt
+
+Then copy the string from the ``temp.txt`` file and add it to a yaml file to
create your secret object.
+For example, ``my-ssh-secret.yaml`` should look like this:
+
+.. code-block:: yaml
+
+ apiVersion: v1
+ kind: Secret
+ metadata:
+ name: airflow-ssh-secret
+ data:
+ gitSshKey: '<base64-converted-ssh-private-key>'
+
+And from a terminal then run:
+
+.. code-block:: bash
+
+ kubectl create -f my-ssh-secret.yaml --namespace <your-airflow-namespace>
+
+You can easily create a yaml file to override values of interest in the
``values.yaml`` file. In this example, I will
+create a yaml file called ``override-values.yaml`` to override values in the
``values.yaml`` file.
+
+.. code-block:: yaml
+
+ dags:
+ gitSync:
+ enabled: true
+ repo: ssh://[email protected]/<username>/<private-repo-name>.git
+ branch: <branch-name>
+ subPath: ""
+ sshKeySecret: airflow-ssh-secret
+
+
+Finally, from the context of your Airflow Helm chart directory, you can
install Airflow:
+
+.. code-block:: bash
+
+ helm install airflow --namespace <your-airflow-namespace> . -f
override-values.yaml
Review comment:
This would likely change when the chart is released?.
Supposing the user added the released chart to helm with:
`helm repo add apache-airflow-chart path/to/chart`.
The install should be:
`helm install airflow --namespace <your-airflow-namespace>
apache-airflow-chart/airflow -f override-values.yaml`
I don't know the best way to add it to this doc, maybe we should merge this
and update the doc when the Chart is released? @kaxil
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]