diff --git a/README.md b/README.md index 199a61fcf..8f8fe8396 100644 --- a/README.md +++ b/README.md @@ -107,3 +107,11 @@ Please go through [CSI Spec](https://github.com/container-storage-interface/spec ### Testing * To build image, run: `make image` * To push image, run: `make push` + +### Running on PowerVS Staging +To test the driver on the staging IBM Cloud PowerVS environment make use of the following environment variables. +``` +export IBMCLOUD_IAM_API_ENDPOINT=https://iam.test.cloud.ibm.com +export IBMCLOUD_RESOURCE_CONTROLLER_ENDPOINT=https://resource-controller.test.cloud.ibm.com; +export IBMCLOUD_POWER_API_ENDPOINT=https://dal.power-iaas.test.cloud.ibm.com # Replace 'dal' with specific region of your test workspace. +``` diff --git a/pkg/cloud/powervs.go b/pkg/cloud/powervs.go index e275651e3..67e4b49e2 100644 --- a/pkg/cloud/powervs.go +++ b/pkg/cloud/powervs.go @@ -65,10 +65,11 @@ func NewPowerVSCloud(cloudInstanceID, zone string, debug bool) (Cloud, error) { func newPowerVSCloud(cloudInstanceID, zone string, debug bool) (Cloud, error) { apikey := os.Getenv("IBMCLOUD_API_KEY") - authenticator := &core.IamAuthenticator{ApiKey: apikey} + authenticator := &core.IamAuthenticator{ApiKey: apikey, URL: os.Getenv("IBMCLOUD_IAM_API_ENDPOINT")} serviceClientOptions := &resourcecontrollerv2.ResourceControllerV2Options{ Authenticator: authenticator, + URL: os.Getenv("IBMCLOUD_RESOURCE_CONTROLLER_ENDPOINT"), } serviceClient, err := resourcecontrollerv2.NewResourceControllerV2(serviceClientOptions) if err != nil {