Working with multiple kubeconfig file having same context has issue due to "LoadsFromKubeConfig.php#writeTempFileForContext attempting to reuse"
declum opened this issue · 2 comments
declum commented
Working with multiple kubeconfig file having same context has issue due to "LoadsFromKubeConfig.php#writeTempFileForContext attempting to reuse"
$tempFilePath = $tempFolder.DIRECTORY_SEPARATOR."ctx-{$context}-{$fileName}";
if (file_exists($tempFilePath)) {
return $tempFilePath;
}
declum commented
I think it should be fine, else it might load /tmp folder if it uses random, but client should be aware of it.
Probably do a checksum and error out instead of just returning if the file exists with the context.
rennokki commented
I'm assuming there should be a user-host-context
prefix, right?