I have node applications where some dependency git repos specified in package.json and deploying using S2I in OCP. To clone the repos I have mounted the sshkey as a secret into /opt/app-root/src/.ssh .. But the permissions are coming default 6 to group that is root. And failing with error npm ERR! Load key "/opt/app-root/src/.ssh/id_rsa": bad permissions. Couple of suggestions from different git links are 1. Use hostpath 2. Runas root 3. Set fsGroup. How can I apply any of these changes into buildConfig? What ever I set in deployConfig is not reflecting for build.
- ls -lasL /opt/app-root/src/.ssh total 20 0 drwxr-xr-x. 3 default root 92 Jan 20 17:35 . 0 drwxrwxr-x. 1 default root 18 Jan 20 17:35 .. 0 drwxr-xr-x. 2 default root 39 Jan 20 17:35 ..2023_01_20_17_35_25.328954621 0 drwxr-xr-x. 2 default root 39 Jan 20 17:35 ..data 4 -rw-------. 1 default root 2610 Jan 20 17:35 id_rsa 16 -rw-------. 1 default root 12403 Jan 20 17:35 known_hosts