Skip to content

sync: expose facets_dedicated min_nodes/desired_nodes in aws_eks spec (0.1 + 0.2)#564

Open
sanmesh-kakade wants to merge 1 commit into
masterfrom
sync/facets-dedicated-min-nodes-master
Open

sync: expose facets_dedicated min_nodes/desired_nodes in aws_eks spec (0.1 + 0.2)#564
sanmesh-kakade wants to merge 1 commit into
masterfrom
sync/facets-dedicated-min-nodes-master

Conversation

@sanmesh-kakade

@sanmesh-kakade sanmesh-kakade commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

Sync of #563 (merged to develop) into master. Cherry-pick of the same change — adds min_nodes and desired_nodes to the facets_dedicated nodepool spec in kubernetes_cluster/aws_eks 0.1 and 0.2.

Details

  • min_nodes (integer, 1–200, default 1) and desired_nodes (integer, 1–200, optional → falls back to Min) added to the form, with x-ui-order updated.
  • Backward compatible: unset → min=1, desired→min (same as before).
  • Pairs with facets-iac (terraform) which consumes these via spec.nodepools.facets_dedicated.{min_nodes,desired_nodes}.

Cherry-picked from develop merge c7487b84.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added configurable minimum and desired node counts for dedicated EKS node pools.
    • Added validation limits and UI visibility controls for the new settings.
    • Updated the configuration interface ordering to include the node count options.

* feat(aws_eks): expose facets_dedicated min_nodes in spec

Add min_nodes to the facets_dedicated nodepool spec (default 1) so the
dedicated managed node group's minimum size is configurable. Set >= 2
for HA of the platform components pinned to the dedicated node pool.

Consumed by facets-iac aws_eks/0.2 via spec.nodepools.facets_dedicated.min_nodes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(aws_eks): add facets_dedicated desired_nodes to spec

Optional desired_nodes for the facets_dedicated nodepool. Falls back to
min_nodes when unset. Applied at node pool creation only (managed node
group ignores desired_size on updates); bounded to [min_nodes, max_nodes].

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(aws_eks): desired_nodes must be within [min,max] (rejected, not clamped)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(aws_eks): add min_nodes/desired_nodes to 0.1 spec too

Mirror the 0.2 field additions in aws_eks 0.1 so both published versions
expose facets_dedicated min/desired node counts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

EKS dedicated node pool sizing

Layer / File(s) Summary
Dedicated node pool sizing schema
modules/kubernetes_cluster/aws_eks/0.1/facets.yaml, modules/kubernetes_cluster/aws_eks/0.2/facets.yaml
Adds constrained min_nodes and desired_nodes fields to facets_dedicated, conditionally displays them when enabled, and includes them in the UI order. Version 0.2 also marks them as UI overrides-only.

Possibly related PRs

Suggested reviewers: anshulsao

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description gives a useful summary, but it omits most required template sections like related issues, type of change, testing, and reviewer instructions. Add the missing template sections: related issues, type of change, checklist, testing details, and reviewer instructions.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the change: adding min_nodes and desired_nodes to aws_eks facets_dedicated in versions 0.1 and 0.2.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/facets-dedicated-min-nodes-master

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
modules/kubernetes_cluster/aws_eks/0.1/facets.yaml (1)

207-231: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Cross-field bounds for min_nodes/max_nodes/desired_nodes are only documented, not enforced by the schema. Both version schemas rely on free-text descriptions to convey that desired_nodes must sit between min_nodes and max_nodes, and that min_nodes should not exceed max_nodes; the JSON Schema itself allows any combination within [1, 200] independently for each field.

  • modules/kubernetes_cluster/aws_eks/0.1/facets.yaml#L207-L231: no schema-level guard against min_nodes > max_nodes or desired_nodes outside [min_nodes, max_nodes].
  • modules/kubernetes_cluster/aws_eks/0.2/facets.yaml#L208-L232: same gap, identical field definitions.

Given the commit messages indicate this constraint is validated during apply in facets-iac, this is likely already covered downstream; flagging here mainly for awareness in case the UI form should surface the error earlier via x-ui-error-message/conditional rules rather than relying solely on backend validation and free text.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/kubernetes_cluster/aws_eks/0.1/facets.yaml` around lines 207 - 231,
The min_nodes, max_nodes, and desired_nodes fields lack UI-level cross-field
validation. In modules/kubernetes_cluster/aws_eks/0.1/facets.yaml lines 207-231
and modules/kubernetes_cluster/aws_eks/0.2/facets.yaml lines 208-232, add
conditional UI validation or x-ui-error-message rules so min_nodes does not
exceed max_nodes and desired_nodes remains between them; retain backend apply
validation and existing field constraints.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@modules/kubernetes_cluster/aws_eks/0.1/facets.yaml`:
- Around line 207-231: The min_nodes, max_nodes, and desired_nodes fields lack
UI-level cross-field validation. In
modules/kubernetes_cluster/aws_eks/0.1/facets.yaml lines 207-231 and
modules/kubernetes_cluster/aws_eks/0.2/facets.yaml lines 208-232, add
conditional UI validation or x-ui-error-message rules so min_nodes does not
exceed max_nodes and desired_nodes remains between them; retain backend apply
validation and existing field constraints.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9fac6668-9fd4-46d6-ba9d-98b6b352dd04

📥 Commits

Reviewing files that changed from the base of the PR and between 5962c23 and 5588937.

📒 Files selected for processing (2)
  • modules/kubernetes_cluster/aws_eks/0.1/facets.yaml
  • modules/kubernetes_cluster/aws_eks/0.2/facets.yaml

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.

1 participant