git-sync with persistent volume claim
See original GitHub issueApache Airflow version: 2.0.2
Kubernetes version: Client Version: v1.17.4, Server Version: v1.18.14
Cloud provider or hardware configuration: Azure
What happened: When using git-sync with persistence enabled, the scheduler pod fails to start.
The command
kubectl logs airflow2-scheduler-79d7f74f46-sgd6h -c git-sync
gives
INFO: detected pid 1, running init handler
I0426 20:32:38.953393 11 main.go:321] "level"=0 "msg"="starting up" "args"=["/git-sync"] "pid"=11
I0426 20:32:38.957866 11 main.go:574] "level"=0 "msg"="cloning repo" "origin"="git@github.com:Cybrik/airflow2-dags.git" "path"="/git"
E0426 20:32:40.633376 11 main.go:347] "msg"="failed to sync repo, aborting" "error"="error running command: exit status 128: { stdout: \"\", stderr: \"Cloning into '/git'...\\nerror: chmod on /git/.git/config.lock failed: Operation not permitted\\nfatal: could not set 'core.filemode' to 'false'\\n\" }"
What you expected to happen:
Airflow deploying correctly
How to reproduce it:
I am using the Helm chart from apache/airflow
create values.yaml
with the following content
dags:
persistence:
enabled: true
existingClaim: dags
gitSync:
enabled: true
repo: "git@github.com:Company/repo.git"
branch: main
subPath: ""
sshKeySecret: airflow-ssh-secret
and a persistent volume claim as follows
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: dags
labels:
tier: airflow
release: airflow2
heritage: "Helm"
spec:
accessModes:
- "ReadWriteMany"
resources:
requests:
storage: "1Gi"
storageClassName: "azurefile"
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Need support on using git-sync and persistent volumes
I am trying to use git-sync to write data from a gitlab repo to a persistent volume, then pull that data into another...
Read more >[stable/airflow] git sync is broken if shared pvc is used ... - GitHub
Setup an NFS volume using stable/nfs-server-provisioner and created a persistentVolumeClaim called airflow-dags with ReadWriteMany ...
Read more >[GitHub] [airflow] zorzigio opened a new issue #15540: git-sync with ...
... zorzigio opened a new issue #15540: git-sync with persistent volume claim ... using git-sync with persistence enabled, the scheduler pod fails to...
Read more >Configure a Pod to Use a PersistentVolume for Storage
After you create the PersistentVolumeClaim, the Kubernetes control plane looks for a PersistentVolume that satisfies the claim's requirements.
Read more >airflow 7.14.1 · airflow-helm/airflow-helm - Artifact Hub
gitSync.refreshTime seconds. ... this method requires a PersistentVolumeClaim which supports accessMode : ReadOnlyMany or ReadWriteMany.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Solved the issue adding
noperm
to theStorageClass
mountOptions
@jedcunningham finally I got round to try this.
I created a custom storage class using
and a persistent volume claim using
Then in the
values.yaml
I am still getting the same error
Any idea?