Skip to content

Commit 8e8e61e

Browse files
Adds .envrc support allowing to have project specific ENV profile facilitating easier kubectl to remote roussev.com k8s
1 parent ae76412 commit 8e8e61e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.envrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
# Always point kubectl to the Terraform-generated kubeconfig when inside this repo.
4+
kubeconfig_path="$PWD/infra/terraform/kubeconfig.yaml"
5+
6+
if [[ -f "$kubeconfig_path" ]]; then
7+
export KUBECONFIG="$kubeconfig_path"
8+
else
9+
echo ".envrc warning: missing $kubeconfig_path" >&2
10+
fi

0 commit comments

Comments
 (0)