mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
Merge pull request #13660 from jsafrane/devel/fix-cloud-init
Auto commit by PR queue bot
This commit is contained in:
commit
79f40d6800
@ -65,15 +65,16 @@ func GetCloudProvider(name string, config io.Reader) (Interface, error) {
|
|||||||
// InitCloudProvider creates an instance of the named cloud provider.
|
// InitCloudProvider creates an instance of the named cloud provider.
|
||||||
func InitCloudProvider(name string, configFilePath string) (Interface, error) {
|
func InitCloudProvider(name string, configFilePath string) (Interface, error) {
|
||||||
var cloud Interface
|
var cloud Interface
|
||||||
|
var err error
|
||||||
|
|
||||||
if name == "" {
|
if name == "" {
|
||||||
glog.Info("No cloud provider specified.")
|
glog.Info("No cloud provider specified.")
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
|
||||||
if configFilePath != "" {
|
if configFilePath != "" {
|
||||||
config, err := os.Open(configFilePath)
|
var config *os.File
|
||||||
|
config, err = os.Open(configFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Couldn't open cloud provider configuration %s: %#v",
|
glog.Fatalf("Couldn't open cloud provider configuration %s: %#v",
|
||||||
configFilePath, err)
|
configFilePath, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user