eksctl
eksctl copied to clipboard
[Feature] Clean up `write-kubeconfig` lock file after command finishes
What feature/behavior/change do you want?
Currently, when a kubeconfig is written using the write-kubeconfig
util, the lock file is left over. Here's an example where I write a kubeconfig to my local directory tracked by git:
❯ eksctl utils write-kubeconfig --cluster beautiful-creature-1663175112 --kubeconfig ./my-kubeconfig.yaml
❯ git status
Untracked files:
(use "git add <file>..." to include in what will be committed)
my-kubeconfig.yaml
my-kubeconfig.yaml.eksctl.lock
Looking over the code, looks like this is needed so eksctl
doesn't attempt multiple writes at the same time to the default kubeconfig. But it'd be great if eksctl
also cleaned up this file so it's not left laying around.
Why do you want this feature?
Generally, it makes sense to me that the "behind the scenes" things are cleaned up and that the user doesn't have unexpected files from some operation.