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

   ## Summary
   
   This PR consolidates work from the `develop` branch: bug fixes, new 
annotation-based IP management, and documentation restructuring.
   
   ### Bug fixes
   - **Prevent public IP orphaning** — Fix four scenarios where CloudStack 
public IPs could be permanently leaked: exact prefix matching in 
`getLoadBalancerByName()` to avoid CloudStack LIKE matching false positives, 
annotation-based IP cleanup/recovery in delete and ensure paths, and a new 
`lookupPublicIPAddress()` helper
   - **Validate target IP before teardown** — Pre-flight 
`validatePublicIPAvailable()` check prevents leaving a service broken when a 
user-specified IP is invalid
   - **Multiple audit fixes** — Nil guards for `nodeAddresses` and 
`symmetricDifference`, fix stale error tracking in `updateFirewallRule`, 
improved config error messages, warning logs for skipped rules
   - **Enable gosec and wrapcheck linters** — Fix all flagged issues
   
   ### Features
   - **Annotation-based IP management** — Replace deprecated 
`spec.LoadBalancerIP` with `cloudstack-load-balancer-address` annotation as the 
primary way to request a specific IP. Add `cloudstack-load-balancer-keep-ip` 
annotation to control IP retention on deletion
   - **ID-based load balancer lookup** — Store CloudStack public IP UUID 
(`cloudstack-load-balancer-id`) and network UUID 
(`cloudstack-load-balancer-network-id`) as annotations for exact ID-based rule 
lookup instead of keyword LIKE matching
   - **Clean up annotations on LB deletion** — Remove all 6 CloudStack LB 
annotations when `EnsureLoadBalancerDeleted` succeeds (e.g., service type 
changed from LoadBalancer to ClusterIP), skip cleanup when service is being 
garbage collected
   
   ### Refactoring
   - **Remove live IP reassignment** — Replace complex IP switch logic with a 
warning event telling users to delete and recreate the service (matches 
OpenStack, AWS, Azure, GCP behavior)
   
   ### Documentation
   - **Reorganize docs** — Move from monolithic README to topic-based pages 
under `docs/` (getting-started, configuration, load-balancer, development). 
Remove outdated references to pre-1.17 labels and the old in-tree provider
   
   ## Test plan
   - [x] All existing tests pass (`go test ./cloudstack/...`)
   - [x] New tests for annotation cleanup on successful/failed LB deletion
   - [x] New tests for orphaned IP recovery and release
   - [x] New tests for ID-based load balancer lookup
   - [x] Linter passes (`golangci-lint run`)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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