Skip to content

Conversation

@vishesh92
Copy link
Member

Fixes #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 vishesh92 requested a review from Copilot November 25, 2025 13:28
Copilot finished reviewing on behalf of vishesh92 November 25, 2025 13:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for a configurable region parameter in the CloudStack cloud provider configuration, allowing users to specify a region independently of the zone. This addresses the limitation where the region was previously always set to the same value as the zone.

Key Changes:

  • Added region field to both CSConfig and CSCloud structs for configuration and storage
  • Updated GetZone method to use the configured region when available, falling back to zone name when not set
  • Maintained backward compatibility by defaulting to zone name when region is not configured

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vishesh92 vishesh92 force-pushed the allow-custom-region branch 2 times, most recently from ff4527c to 2433dd9 Compare November 25, 2025 14:16
@vishesh92 vishesh92 requested a review from Copilot November 25, 2025 14:16
Copilot finished reviewing on behalf of vishesh92 November 25, 2025 14:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vishesh92 vishesh92 marked this pull request as ready for review November 25, 2025 15:04
@vishesh92 vishesh92 added this to the 1.2.0 milestone Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Requests: allow custom topology.kubernetes.io/region

1 participant