• Kubernetes Submit Queue's avatar
    Merge pull request #31881 from guangxuli/get_docker_auth · 609b9e51
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    make function ReadDockerConfigFile more flexible
    
    In our code, the public function `ReadDockerConfigFile` looks like not enough flexible:
    when I want to use this function to get docker config info from a specific path, I have to call  `SetPreferredDockercfgPath`, and then the setting preferredPath will be valid in function  `ReadDockerConfigFile`.  I know in our code, we call  `SetPreferredDockercfgPath` in one place ,then call `ReadDockerConfigFile` in another place, it was not in same context. But it looks like not thread safety. 
     I think if user who use our code want to get docker config from a specific path, it is reasonable to call directly `ReadDockerConfigFile ` with a dockerconfigPath argument, and it can avoid some scenarios that thread is not safety . 
    I add a test case for this function.
    609b9e51
Name
Last commit
Last update
..
aws Loading commit data...
gcp Loading commit data...
OWNERS Loading commit data...
config.go Loading commit data...
config_test.go Loading commit data...
doc.go Loading commit data...
keyring.go Loading commit data...
keyring_test.go Loading commit data...
plugins.go Loading commit data...
provider.go Loading commit data...
provider_test.go Loading commit data...