Dernière activité 1753214750

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

kubernetes_shell.nix Brut
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 sops # SOPS for secrets encryption/decryption
12 age # age encryption backend for SOPS
13 gnupg # for PGP/GPG support, if needed
14 kubectl # included separately for completions (supports minikube override/alias)
15 envsubst # for templating manifests, useful in CI/CD flows
16 ];
17
18 shellHook = ''
19 echo "Development shell loaded."
20
21 # Enable kubectl completion
22 if command -v kubectl > /dev/null; then
23 source <(kubectl completion bash)
24 fi
25
26 # Enable helm completion
27 if command -v helm > /dev/null; then
28 source <(helm completion bash)
29 fi
30
31 # Alias kubectl to minikube kubectl for convenience
32 alias kubectl='minikube kubectl --'
33
34 echo "Type 'kubectl' to use the Minikube-provided kubectl."
35 '';
36}
37