Previous change had a regression where $HOME in kubernetes.kubeconfig would be expanded at build-time.
This is because --set KUBECONFIG "${kubeconfig}" (where kubeconfig = "$HOME/.kube/config") would evaluate to --set KUBECONFIG "/home/homeless-shelter/.kube/config" at build-time.
We also cannot do --set KUBECONFIG '${kubeconfig}' because wrapProgram renders this as export KUBECONFIG='$HOME/.kube/config'.
Note the single quotes, which prevents expansion of $HOME.
A solution here is to avoid using --set altogether and use --run with any quotes instead, which allows to expand ~ as well.
Previous change had a regression where
$HOME
inkubernetes.kubeconfig
would be expanded at build-time. This is because--set KUBECONFIG "${kubeconfig}"
(wherekubeconfig = "$HOME/.kube/config"
) would evaluate to--set KUBECONFIG "/home/homeless-shelter/.kube/config"
at build-time.We also cannot do
--set KUBECONFIG '${kubeconfig}'
becausewrapProgram
renders this asexport KUBECONFIG='$HOME/.kube/config'
. Note the single quotes, which prevents expansion of$HOME
.A solution here is to avoid using
--set
altogether and use--run
with any quotes instead, which allows to expand~
as well.