I have a short and sweet question around getting helm (the Kubernetes package manager) plugins to work. Plugins are built into the utility but trying to install them leads to permission errors since the package is installed via nix and the directory is read-only. Has anyone had any luck installing helm plugins?
Here is the shell.nix file I’ve been working with:
let pkgs = import <nixpkgs> { };
in
pkgs.mkShell rec {
name = "kube-state-metrics-deployment";
buildInputs = with pkgs; [
# External Dependencies
curl
docker
git
kubectl
kubernetes-helm-wrapped
kustomize
jq
openssh
];
shellHook = ''
helm plugin install https://github.com/databus23/helm-diff
'';
}
I’ve tried the shellHook but this is a post-install step so it faces the same permissions issues. I’m tempted to just create a docker image and remote dev this but hopefully, it won’t come to that.
I haven’t tried that yet, I was hoping to not install helm globally. I was trying to install it in the specific repo’s shell.nix. I use a couple systems and have direnv set up to autoload these when I enter the directories for the repository.
I can give it a whirl with the global setup to see if it works outside of the repo-specific nix-shell. But when running the command manually just in a shell I still get read-only errors.