Skip to content

Commit

Permalink
Re-enable multizone fully supported (#9)
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
  • Loading branch information
pierre-emmanuelJ authored Feb 14, 2024
1 parent d7090e0 commit a89a443
Show file tree
Hide file tree
Showing 11 changed files with 722 additions and 598 deletions.
14 changes: 7 additions & 7 deletions cmd/exoscale-csi-driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ func main() {
apiKey := os.Getenv("EXOSCALE_API_KEY")
apiSecret := os.Getenv("EXOSCALE_API_SECRET")
// Mostly for internal use.
apiURL := os.Getenv("EXOSCALE_API_ENDPOINT")
apiEndpoint := os.Getenv("EXOSCALE_API_ENDPOINT")

// The node mode don't need secrets and do not interact with Exoscale API.
if *mode != string(driver.NodeMode) && (apiKey == "" || apiSecret == "") {
klog.Fatalln("missing or incomplete API credentials")
}

exoDriver, err := driver.NewDriver(&driver.DriverConfig{
Endpoint: *endpoint,
Mode: driver.Mode(*mode),
Prefix: *prefix,
APIKey: apiKey,
APISecret: apiSecret,
Zone: v3.URL(apiURL),
Endpoint: *endpoint,
Mode: driver.Mode(*mode),
Prefix: *prefix,
APIKey: apiKey,
APISecret: apiSecret,
ZoneEndpoint: v3.Endpoint(apiEndpoint),
})
if err != nil {
klog.Error(err)
Expand Down
Loading

0 comments on commit a89a443

Please sign in to comment.