Persist spot and reservation across node pool updates - #312
Persist spot and reservation across node pool updates#312JyotinderSingh wants to merge 2 commits into
Conversation
The `accelerators` stack export recorded a pool's accelerator shape but not its `spot` or `reservation` settings. Because `kinetic up`, `pool add`, and `pool remove` all rebuild the full pool list from that export and re-declare every pool, the settings came back as their defaults (spot=False, no reservation affinity). Both land in the GKE node pool's node_config, which is ForceNew in the GCP provider, so the next pool operation silently replaced a Spot pool with an on-demand one and dropped reservation affinity. Record both fields in the per-pool export and read them back in `_export_to_node_pool`. Exports written before this change lack the keys and fall back to False / None. Also surface both in the `pool list` and `status` tables — spot as a provisioning model, reservation only when set. Fields missing from an older export are omitted rather than shown as a guessed default.
Record in the Spot and reservation guides that Kinetic keeps these settings across later pool commands, and that `kinetic pool list` shows them. Add a note about a pool from an earlier version of Kinetic: the cluster state has no record of its setting, so the next pool command drops the setting.
There was a problem hiding this comment.
Code Review
This pull request adds support for tracking and displaying the provisioning model (Spot vs. On-demand) and reservation affinity of GKE node pools in Kinetic. It updates the Pulumi stack exports to record these settings, ensures they survive round-trips during pool updates, and updates the CLI output to display them. Comprehensive unit tests and documentation updates are also included. I have no feedback to provide as there are no review comments.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #312 +/- ##
=======================================
Coverage ? 36.86%
=======================================
Files ? 83
Lines ? 15370
Branches ? 0
=======================================
Hits ? 5666
Misses ? 9704
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
The
acceleratorsstack export recorded a pool's accelerator shape but not itsspotorreservationsettings. Becausekinetic up,pool add, andpool removeall rebuild the full pool list from that export and re-declare every pool, the settings came back as their defaults (spot=False, no reservation affinity). Both land in the GKE node pool's node_config, which is ForceNew in the GCP provider, so the next pool operation silently replaced a Spot pool with an on-demand one and dropped reservation affinity.Record both fields in the per-pool export and read them back in
_export_to_node_pool. Exports written before this change lack the keys and fall back to False / None.Also surface both in the
pool listandstatustables — spot as a provisioning model, reservation only when set. Fields missing from an older export are omitted rather than shown as a guessed default.Contributor Agreement