devantler-tech / devantler-tech/ksail

feat(update): reconcile the floatingIPEnabled disable transition (true→false)

Open
#6,032 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
165
Forks
12
Avg merge
5h 41m
Merged PRs (30d)
337

Description

> 🤖 Generated by the Daily AI Engineer

## Problem

#5947 makes `cluster update` reconcile `floatingIPEnabled: true` (create + attach the floating IP, apply the VIP block in place). The **disable** transition (`true`→`false` while a ksail-owned floating IP exists) is deliberately deferred: `cluster update` detects it and warns, but does not apply it.

## Proposed direction

Reconciling the disable path needs two design decisions the enable path doesn't:
- **Endpoint reversion semantics** — the machine-config endpoint/SANs and any kubeconfig/talosconfig clients pointing at the floating IP must migrate back to a node IP without breaking cluster access mid-apply (remove the VIP block first, apply, then detach).
- **Deletion policy** — whether disabling deletes the ksail-owned floating IP (mirroring `cluster delete`'s ownership-guarded `deleteFloatingIP`) or only detaches it, and how to avoid releasing a billed address the user still wants. Default proposal: detach + delete when ksail-owned (the same guard as delete), with the warning naming the IP before removal.

Implementation then mirrors the enable path: extend `mergeFloatingIPChanges` to emit the disable change instead of warning, and extend `reconcileFloatingIPEndpoint` to strip the VIP block/SANs, re-render the node-IP endpoint, push in place, then detach/delete.

## Rough size

S–M — the detection/apply plumbing exists after #5947; the work is the reversion ordering plus tests.

Part of #5947's acceptance criteria (toggle-off path), split out so the enable/drift fix ships first.

Contributor guide

Open the contributing guide

Research direction

Start with the existing cluster update flow after #5947, especially mergeFloatingIPChanges and reconcileFloatingIPEndpoint, then compare cluster delete's ownership-guarded deleteFloatingIP behavior. Trace the endpoint, VIP block, SAN, detach, and deletion ordering, and inspect the related tests. Done means the true→false transition reverts access safely and applies the documented ownership-aware deletion policy.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cli, cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.