Skip to content

Conversation

@ljluestc
Copy link

  • Add attribute-based node selection to KubeMarine for both CLI tasks and upgrade procedures.
  • Issue / motivation (Run tasks by node attributes specific parameters – Run tasks by node attributes specific parameters #419):
    • KubeMarine previously could only target nodes by explicit name in both task flows and upgrade procedures.
    • This made it difficult to operate on label‑ or role‑driven topologies, for example:
      • “All workers in region=infra
      • “All infra nodes in a specific zone
    • The same subsets of nodes had to be duplicated by name across inventories and procedure YAMLs, increasing maintenance cost and risk of drift.
    • The desired behavior from Run tasks by node attributes specific parameters #419 is:
      • Procedure example:
        upgrade_plan:
          - v1.26.3
        
        upgrade_nodes:
          labels: { region: infra }
      • CLI example:
        kubemarine install --tasks="prepare.package_manager" --nodes="labels='region=infra'"
  • This change introduces:
    • A --nodes selector flag for task-based CLI flows.
    • Selector objects (labels, roles) for upgrade_nodes in the procedure inventory.
    • Centralized node-group filtering in KubernetesCluster, so existing tasks automatically gain selector support without per-task changes.

Fixes #419

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