vishesh92 opened a new pull request, #86:
URL: https://github.com/apache/cloudstack-kubernetes-provider/pull/86

   This requires a new cloudstack-go SDK release for it to work with ACS 4.22+
   
   <details><summary>Generated summary</summary>
   <p>
   
   This pull request introduces support for specifying source CIDRs for 
CloudStack load balancers via a new Kubernetes service annotation, and improves 
load balancer rule management to handle CIDR list changes and CloudStack 
version compatibility. The changes also add version detection for the 
CloudStack management server, which is used to determine whether certain 
features (like updating the CIDR list) are supported.
   
   **Load Balancer Source CIDRs and Version Handling:**
   
   * Added support for the 
`service.beta.kubernetes.io/cloudstack-load-balancer-source-cidrs` annotation 
to allow specifying a comma-separated list of source CIDRs for load balancers; 
defaults to allowing all sources if unspecified. (`cloudstack_loadbalancer.go`, 
`ServiceAnnotationLoadBalancerSourceCidrs`) 
[[1]](diffhunk://#diff-894b1db96572f6f07b810149b1d415c3206535e20a69d57880ff92b0e3782355R48-R52)
 
[[2]](diffhunk://#diff-894b1db96572f6f07b810149b1d415c3206535e20a69d57880ff92b0e3782355L616-R698)
   * Introduced the `getCIDRList` helper to parse and validate the CIDR list 
from the service annotation, ensuring only valid CIDRs are accepted. 
(`cloudstack_loadbalancer.go`)
   
   **CloudStack Management Server Version Awareness:**
   
   * Added detection of the CloudStack management server version using the 
`semver` library, storing it in the `CSCloud` struct for use in feature gating. 
(`cloudstack.go`) 
[[1]](diffhunk://#diff-28b0490de1680e4f973851793115f10ce846231b5a48047805322b7bd18dcf20R28-R31)
 
[[2]](diffhunk://#diff-28b0490de1680e4f973851793115f10ce846231b5a48047805322b7bd18dcf20R58)
 
[[3]](diffhunk://#diff-28b0490de1680e4f973851793115f10ce846231b5a48047805322b7bd18dcf20R91)
 
[[4]](diffhunk://#diff-28b0490de1680e4f973851793115f10ce846231b5a48047805322b7bd18dcf20R102-R127)
   
   **Load Balancer Rule Management Improvements:**
   
   * Enhanced `checkLoadBalancerRule` to compare the current and desired CIDR 
lists, and to decide whether to update or recreate the rule based on changes 
and the CloudStack version (since updating the CIDR list is only supported in 
CloudStack 4.22+). Added a helper `setsEqual` for comparing CIDR lists. 
(`cloudstack_loadbalancer.go`)
   * Updated `EnsureLoadBalancer` and related methods to pass the service and 
version information, enabling proper handling of CIDR list changes and 
version-specific logic. (`cloudstack_loadbalancer.go`)
   
   **Dependency Updates:**
   
   * Added `github.com/blang/semver/v4` as a dependency for semantic version 
parsing and comparison. (`cloudstack.go`, `cloudstack_loadbalancer.go`) 
[[1]](diffhunk://#diff-28b0490de1680e4f973851793115f10ce846231b5a48047805322b7bd18dcf20R28-R31)
 
[[2]](diffhunk://#diff-894b1db96572f6f07b810149b1d415c3206535e20a69d57880ff92b0e3782355R30)
   
   </p>
   </details> 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to