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 c4ab31b commit dcd0287
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/adaptor/cloud/ibmcloud/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,17 @@ func (*Manager) LoadEnv() {
cloud.DefaultToEnv(&ibmcloudVPCConfig.VpcServiceURL, "IBMCLOUD_VPC_ENDPOINT", "")
cloud.DefaultToEnv(&ibmcloudVPCConfig.ResourceGroupID, "IBMCLOUD_RESOURCE_GROUP_ID", "")
cloud.DefaultToEnv(&ibmcloudVPCConfig.ProfileName, "IBMCLOUD_PODVM_INSTANCE_PROFILE_NAME", "")
cloud.DefaultToEnv(&ibmcloudVPCConfig.InstanceProfiles, "IBMCLOUD_PODVM_INSTANCE_PROFILE_LIST", "")
cloud.DefaultToEnv(&ibmcloudVPCConfig.ZoneName, "IBMCLOUD_ZONE", "")
cloud.DefaultToEnv(&ibmcloudVPCConfig.PrimarySubnetID, "IBMCLOUD_VPC_SUBNET_ID", "")
cloud.DefaultToEnv(&ibmcloudVPCConfig.PrimarySecurityGroupID, "IBMCLOUD_VPC_SG_ID", "")
cloud.DefaultToEnv(&ibmcloudVPCConfig.KeyID, "IBMCLOUD_SSH_KEY_ID", "")
cloud.DefaultToEnv(&ibmcloudVPCConfig.VpcID, "IBMCLOUD_VPC_ID", "")

var instanceProfilesStr string
cloud.DefaultToEnv(&instanceProfilesStr, "IBMCLOUD_PODVM_INSTANCE_PROFILE_LIST", "")
if instanceProfilesStr != "" {
ibmcloudVPCConfig.InstanceProfiles.Set(instanceProfilesStr)
}
}

func (*Manager) NewProvider() (cloud.Provider, error) {
Expand Down

0 comments on commit dcd0287

Please sign in to comment.