travisghansen / argo-cd-helmfile

Integration between argo-cd and helmfile
MIT License
223 stars 55 forks source link

/usr/local/bin/argo-cd-helmfile.sh: permission denied #13

Closed smilelikeshit closed 2 years ago

smilelikeshit commented 2 years ago

hi im try to follow tutorial installed helmfile plugin. but i got error

Unable to create application: application spec for app is invalid: InvalidSpecError: Unable to generate manifests in .: rpc error: code = Unknown desc = Manifest generation error (cached): fork/exec /usr/local/bin/argo-cd-helmfile.sh: permission denied

any suggest?

travisghansen commented 2 years ago

Can you exec into the container check the file permissions on the script?

smilelikeshit commented 2 years ago

yes owner file has root. have executable but user argocd cant execute. im using argocd:v2.2.1 @travisghansen

travisghansen commented 2 years ago

Can you send over the ls output?

smilelikeshit commented 2 years ago
drwxrwxr-x 1 argocd root 4096 Dec 24 15:04 .
drwxr-xr-x 1 root   root 4096 Dec 17 01:25 ..
drwxrwxrwx 2 root   root 4096 Dec 24 15:04 argo-cd-helmfile.sh
drwxr-xr-x 3 root   root 4096 Dec 24 15:04 cmp-server
drwxrwxrwx 2 root   root 4096 Dec 24 15:04 helmfile
initContainers:
      - name: download-tools
        image: alpine:3.8
        command: [sh, -c]
        args:
          - >-
            wget -O argo-cd-helmfile.sh https://raw.githubusercontent.com/travisghansen/argo-cd-helmfile/master/src/argo-cd-helmfile.sh &&
            chmod +x argo-cd-helmfile.sh &&
            wget -O helmfile https://github.com/roboll/helmfile/releases/download/v0.138.7/helmfile_linux_amd64 &&
            chmod +x helmfile && 
            mv argo-cd-helmfile.sh /custom-tools/ &&
            mv helmfile /custom-tools/ &&
            chown 999:999 /custom-tools/argo-cd-helmfile.sh &&
            chown 999:999 /custom-tools/helmfile

im try to move $HOME directory for executable but the same error permission denied @travisghansen

smilelikeshit commented 2 years ago

issue on argocd version v2.2.1 @travisghansen . im try to lower argocd version v2.1.5 running well based on documentation.

root issue coz the file helmfile and argo-cd-helmfile.sh was mounting as directory not file.

travisghansen commented 2 years ago

Enjoy!