hermit icon indicating copy to clipboard operation
hermit copied to clipboard

Unable to install components in a gcloud managed by hermit becasue the pkg folder is read-only

Open kuisathaverat opened this issue 1 year ago • 2 comments

kubectl 1.25 will remove a bunch of code related to vendors login code. In the case of GKE, after kubectl 1.25 you will have to install gke-gcloud-auth-plugin component in order to execute command like kubectl exec. Because of that, we have to run gcloud components install gke-gcloud-auth-plugin command to install this component, but it fails on a gcloud managed by hermit because the folder where the stuff is installed is read-only. The workaround is to give write permissions (chmod -R u+rw folder) to the user but it is not obvious. Is there a way to inform hermit that some folders should be read-write?

❯ gcloud components install gke-gcloud-auth-plugin
ERROR: (gcloud.components.install) You cannot perform this action because you do not have permission to modify the Google Cloud SDK installation directory [/Users/foo/Library/Caches/hermit/pkg/gcloud-360.0.0].

kuisathaverat avatar Jul 19 '22 15:07 kuisathaverat

As you can imagine, having mutable package installations breaks the "hermetic" guarantees of Hermit. Unfortunately some packages (Flutter is another example) require this, which is incredibly unfortunate.

It looks like the plugin can be installed without using gcloud, so the preferred option would be to have a Hermit package for the auth plugin.

alecthomas avatar Jul 20 '22 23:07 alecthomas

If this is not possible, the newly added mutable = true manifest attribute can be used.

alecthomas avatar Jul 20 '22 23:07 alecthomas