Comments (5)
The permissions don't allow git-sync to create the credentials file.
You can either do the hacky/non-secure way and runAsUser: 0
or set the permissions of the volume so that git-sync can edit the files.
from git-sync.
@stp-ip could you please clarify what permissions I have to set to the volume? It's not very clear how git-sync container works internally. I'm using git-sync in conjunction with https://github.com/box/kube-applier so my deployment.yaml
looks similar to this:
apiVersion: "extensions/v1beta1"
kind: "Deployment"
metadata:
name: "kube-applier"
namespace: "kube-system"
spec:
replicas: 1
template:
metadata:
labels:
app: "kube-applier"
spec:
containers:
- name: "kube-applier"
command:
- "/kube-applier"
env:
- name: "REPO_PATH"
value: "/git/repo"
- name: "LISTEN_PORT"
value: "2020"
- name: "WHITELIST_PATH"
value: "/git/repo/k8s"
image: "g4s8/kube-applier:v0.1.2"
ports:
- containerPort: 2020
volumeMounts:
- name: "git-repo"
mountPath: "/git"
- name: "git-sync"
command:
- "/git-sync"
env:
- name: "GIT_SYNC_REPO"
# repo
- name: "GIT_SYNC_DEST"
value: "repo"
- name: "GIT_SYNC_USERNAME"
valueFrom:
secretKeyRef:
# username key ref
- name: "GIT_SYNC_PASSWORD"
valueFrom:
secretKeyRef:
# passord key ref
image: "gcr.io/google_containers/git-sync:v2.0.6"
ports:
- containerPort: 2020
volumeMounts:
- name: "git-repo"
mountPath: "/git"
volumes:
- name: "git-repo"
emptyDir: {}
from git-sync.
Wanted to provide you with the other workaround, but while testing ran into a k8s issue it seems: kubernetes/kubernetes#34982
from git-sync.
PR #98 will address this issue
from git-sync.
Thanks
from git-sync.
Related Issues (20)
- Remediate security vulnerabilities on 4.1.0 HOT 5
- High vulnerability CVE-2023-6246 and CVE-2023-6779 HOT 1
- Issue with PYTHONPATH Resolution in git-sync 4.0.0 HOT 2
- v4 slack webhook HOT 6
- exechook behavior HOT 4
- Remediate 4.2.2 security vulnerabilities HOT 1
- Support GitHub App authentication HOT 7
- TODO: infra to make #878 work HOT 1
- Curious about real example raising race condition when using v3 HOT 1
- exechook working HOT 8
- TODO: shellcheck test_e2e.sh and test_git.sh HOT 5
- /bin/sh: ./build/test.sh: not found
- test_e2e.sh: use `local` for all variables defined inside functions HOT 2
- git-sync Multiple Vulnerabilities HOT 3
- how can put specific html folder from my git repo to nginx pod? HOT 2
- git-sync produced an intermediate file,the path of command is wrong HOT 1
- How to use GITSYNC_SYNC_ON_SIGNAL parameter through helm in k8s? HOT 2
- Issue with building Git Sync Container HOT 3
- Issue with Git-sync repo inside a repo, Nested repo for airflow files HOT 7
- On initial sync, all files are in deleted status HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-sync.