Skip to content

Conversation

@t0mmylam
Copy link
Collaborator

@t0mmylam t0mmylam commented Oct 2, 2025

Add Compartment-Based Node Assignment for Deployment Policies

This PR implements compartment-based node partitioning for Skyhook deployment policies, enabling fine-grained control over node selection and rollout strategies.

Key Changes:

  • New compartment system: Added Compartment wrapper with node assignment logic based on label selectors
  • Enhanced cluster state: Extended SkyhookNodes interface to support compartment management (AddCompartment, AddCompartmentNode)
  • Node partitioning: Implemented partitionNodesIntoCompartments() function that assigns nodes to appropriate compartments or defaults
  • Deployment policy integration: Updated BuildState() to create compartments from deployment policy specs
  • Code quality: Refactored Reconcile() method to reduce cyclomatic complexity and fixed linting issues

Technical Details:

  • Nodes are assigned to compartments based on LabelSelector matching
  • Unmatched nodes automatically fall back to the "default" compartment
  • Added comprehensive test coverage and mock interfaces
  • Fixed mockery configuration path

This enables deployment policies to define compartments with specific node selectors, budgets, and strategies for more controlled rollouts across different node groups.

@t0mmylam t0mmylam changed the title Compartment node assignment Add Compartment-Based Node Assignment for Deployment Policies Oct 2, 2025
@t0mmylam t0mmylam changed the title Add Compartment-Based Node Assignment for Deployment Policies feat: Add Compartment-Based Node Assignment for Deployment Policies Oct 2, 2025
@t0mmylam t0mmylam changed the title feat: Add Compartment-Based Node Assignment for Deployment Policies feat: add compartment-based node assignment Oct 2, 2025
@t0mmylam t0mmylam merged commit 299a07d into main Oct 3, 2025
6 checks passed
@t0mmylam t0mmylam deleted the compartment-node-assignment branch October 3, 2025 15:59
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.

3 participants