cloudstack-kubernetes-provider icon indicating copy to clipboard operation
cloudstack-kubernetes-provider copied to clipboard

Allow custom region from config

Open vishesh92 opened this issue 1 week ago • 0 comments

Fixes https://github.com/apache/cloudstack-kubernetes-provider/issues/39

Details

This pull request introduces support for a configurable region parameter in the CloudStack cloud provider code. The main change is the addition of the region field to the configuration and internal structures, allowing the region to be set independently of the zone. The logic in the GetZone method is updated to use the configured region if provided.

Configuration and struct updates:

  • Added a region field to the CSConfig struct and its configuration parsing, allowing users to specify a region in their configuration file.
  • Added a region field to the CSCloud struct to store the configured region for use throughout the codebase.
  • Updated the newCSCloud constructor to initialize the region field from the configuration.

Behavioral change:

  • Modified the GetZone method to set the zone.Region field to the configured region if it is set; otherwise, it defaults to using the zone as the region.

vishesh92 avatar Nov 25 '25 13:11 vishesh92