This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit a1077dca5a77e7debb416c54cd9db9cb7e1edc55
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri Sep 25 12:31:45 2020 +0200

    Fix gitSync user in the helm Chart (#11127)
    
    There was a problem with user in Git Sync mode of the Helm Chart
    in connection with the git sync image and official Airflow
    image. Since we are using the official image, most of the
    containers are run with the "50000" user, but the git-sync image
    used by the git sync user is 65533 so we have to set it as
    default. We also exposed that value as parameter, so that
    another image could be used here as well.
    
    (cherry picked from commit ce6b257de7b442e9103728c2a293df23ece909d2)
---
 chart/templates/_helpers.yaml | 2 ++
 chart/values.yaml             | 1 +
 2 files changed, 3 insertions(+)

diff --git a/chart/templates/_helpers.yaml b/chart/templates/_helpers.yaml
index 49c3b3f..195d484 100644
--- a/chart/templates/_helpers.yaml
+++ b/chart/templates/_helpers.yaml
@@ -105,6 +105,8 @@
 {{- define "git_sync_container"}}
 - name: {{ .Values.dags.gitSync.containerName }}
   image: "{{ .Values.dags.gitSync.containerRepository }}:{{ 
.Values.dags.gitSync.containerTag }}"
+  securityContext:
+    runAsUser: {{ .Values.dags.gitSync.uid }}
   env:
     {{- if .Values.dags.gitSync.sshKeySecret }}
     - name: GIT_SSH_KEY_FILE
diff --git a/chart/values.yaml b/chart/values.yaml
index b8c4fcf..c0b9ff5 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -601,3 +601,4 @@ dags:
     containerRepository: k8s.gcr.io/git-sync
     containerTag: v3.1.6
     containerName: git-sync
+    uid: 65533

Reply via email to