最後活躍 1753214750

Shell nix file for setting up helm dependencies correctly for local dev

修訂 d9f63e6e5ffd8257972719f420c9a71347aa4c95

kubernetes_shell.nix 原始檔案
1{ pkgs ? import <nixpkgs> {} }:
2
3pkgs.mkShell {
4 buildInputs = with pkgs; [
5 minikube
6 kubernetes-helm
7 bash-completion
8 jq
9 docker
10 just
11 ];
12
13 shellHook = ''
14 echo "Development shell loaded."
15
16 # Enable kubectl completion
17 if command -v kubectl > /dev/null; then
18 source <(kubectl completion bash)
19 fi
20
21 # Enable helm completion
22 if command -v helm > /dev/null; then
23 source <(helm completion bash)
24 fi
25
26 # Alias kubectl to minikube kubectl for convenience
27 alias kubectl='minikube kubectl --'
28
29 echo "Type 'kubectl' to use the Minikube-provided kubectl."
30 '';
31}
32
33