-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use relative path to kubeconfig files in mirrord.json #2262
Comments
Hey! Thanks for the suggestion. let kubeconfig = shellexpand::tilde(&kubeconfig);
let parsed_kube_config = Kubeconfig::read_from(kubeconfig.deref())?; I'll send a patch to also expand environment variables - I'm not sure what's the "current directory" from our execution context, but hopefully the env would be good enough? |
I've sent a PR - we just had 2 releases today so I'd prefer to postpone it to early next week ;) |
@aviramha many thanks! is there a canonical env var for the current project directory I wonder? I guess thats maybe more of a question for the IntelliJ plugin; it could maybe pass that along when it runs mirrord agent |
@jstrachan not sure if we have the project directory from our context - seems there's an open issue for IntelliJ to provide it |
we have lots of different git repositories that work with different kubernetes clusters; so we tend to check in local kube config files to each git repository. e.g. relative to the git directory they may be in:
./kubeconfigs/dev/.kube/config
for theDev
environmenthowever I’ve only been able to refer to these project local kube config files using an absolute path in the
.mirrord/mirrord.json
file; all attempts at relative paths don't seem to work. I guess this is due to the mirrord plugin/agent running in a different temp directory maybe?I wonder is it possible to use a relative path or expression/environment variable for the current IntelliJ project directory inside the
kubeconfig
value in the.mirrord/mirrord.json
file?As I’d love to be able to check in the
.mirrord/mirrord.json
file to git but right now it only works on 1 persons laptop due to the absolute path.If this isn’t supported yet I’ll happy try figure out a patch; any hints/tips greatly appreciated - thanks!
The text was updated successfully, but these errors were encountered: