cloudposse / cloudposse/geodesic

Geodesic shell wrongly treats $KUBECONFIG as a file

Open
#457 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
1.1k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

## what
* [`geodesic.kube-ps1.sh`](https://github.com/cloudposse/geodesic/blob/master/rootfs/etc/profile.d/geodesic.kube-ps1.sh) turns kube-ps1 on and off automatically depending on kubecfg existence
* but $KUBECONFIG isn't a file, it's a $PATH-like envvar (see [K8s docs](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable))

## why
* Geodesic shouldn't turn kube-ps1 off if $KUBECONFIG or the cached envvar isn't an existing file

---

Not sure exactly how to fix this - should probably use `kubectl config` instead though, that parses $KUBECONFIG and merges configs and such.

This came up because I was extending the $KUBECONFIG var to enable aws-iam-authenticator integration - writing to a file in `/dev` while building the container doesn't work because it's temporary.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.