Uploaded image for project: 'Agent-based Installer for OpenShift'
  1. Agent-based Installer for OpenShift
  2. AGENT-1348

OFCIR: Improve logic to remove a CIR resource for pool downsizing

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected
    • Agent Sprint 278

      User Story:

      As an Administrator/CI Maintainer,

      • I want to be able to manually label specific CI Resources (CIRs) for deletion when downsizing a pool,

      so that 

      • I can control exactly which resources are removed, bypassing the default oldest-first pruning logic for those labeled resources.

       

      The change will focus on modifying the deleteCIResources() method (or its equivalent) to prioritize labeled resources.

      1. Introduce the Eviction Label: Define the label cir/eviction: "true".
      1. Prioritize Labeled CIRs: When a pool downsize event occurs, the deletion logic must execute in two phases:
        • Phase 1: Query for all CIRs belonging to the pool that are in an acceptable state (Available, Maintenance, or Error) AND have the cir/eviction: "true" label. Remove these first, up to the required downsize count.
        • Phase 2: If the required removal count is not met, fall back to the existing logic (pruning newest resources first) to select the remainder.
      1. Required State Check: Ensure only labeled CIRs in the required states (Available, Maintenance, or Error) are eligible for targeted removal.

      Acceptance Criteria:

      Description of criteria:

      • GIVEN an Administrator wants to remove a specific set of CIRs from a pool.
      • WHEN the Administrator manually adds the label cir/eviction: "true" to N CIRs that are in an Available, Maintenance, or Error state.
      • AND the Administrator attempts to downsize the pool by at least N units.
      • THEN the deleteCIResources() method MUST first select and process the N CIRs marked with the cir/eviction: "true" label for removal.
      • AND THEN if more resources need to be removed to meet the downsize request, the operator MUST apply its standard logic (pruning newest resources in Available, Maintenance, or Error states) to select the remaining required CIRs.

      (optional) Out of Scope:

      Detail about what is specifically not being delivered in the story

      Engineering Details:

      This requires/does not require a design proposal.
      This requires/does not require a feature gate.

              ppinjark@redhat.com pawan pinjarkar
              ppinjark@redhat.com pawan pinjarkar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: