Skip to content

Commit

Permalink
peerpod-ctl: Fix problem in LoadEnv in IBMCloud Provider
Browse files Browse the repository at this point in the history
Fixes: confidential-containers#1454

Signed-off-by: Qi Feng Huo <[email protected]>
  • Loading branch information
Qi Feng Huo committed Sep 21, 2023
1 parent 7f6d437 commit c4ab31b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions peerpod-ctrl/controllers/peerpod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,11 @@ func (r *PeerPodReconciler) cloudConfigsGetter() error {

func SetProvider() (cloud.Provider, error) {
cloudName := os.Getenv("CLOUD_PROVIDER")
logger.Info("CLOUD_PROVIDER: ", cloudName)
if cloud := cloudmgr.Get(cloudName); cloud != nil {
cloud.LoadEnv() // we assume LoadEnv knows to load all necessary configs
provider, err := cloud.NewProvider()
if err != nil {
return nil, err
return nil, fmt.Errorf("SetProvider %s has error: %s", cloudName, err.Error())
}
return provider, nil
}
Expand Down

0 comments on commit c4ab31b

Please sign in to comment.