Giter Club home page Giter Club logo

Comments (5)

stp-ip avatar stp-ip commented on August 19, 2024

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.

g4s8 avatar g4s8 commented on August 19, 2024

@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.

stp-ip avatar stp-ip commented on August 19, 2024

Wanted to provide you with the other workaround, but while testing ran into a k8s issue it seems: kubernetes/kubernetes#34982

from git-sync.

gianrubio avatar gianrubio commented on August 19, 2024

PR #98 will address this issue

from git-sync.

g4s8 avatar g4s8 commented on August 19, 2024

Thanks

from git-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.