Skip to content

fix(orchestrator): add kube_vip group in inventory only when K8s functional groups are defined - #5151

Merged
abhishek-sa1 merged 2 commits into
dell:issue-4849-omnia-modernizationfrom
priti-parate:issue-4849-omnia-modernization
Sep 4, 2026
Merged

fix(orchestrator): add kube_vip group in inventory only when K8s functional groups are defined#5151
abhishek-sa1 merged 2 commits into
dell:issue-4849-omnia-modernizationfrom
priti-parate:issue-4849-omnia-modernization

Conversation

@priti-parate

@priti-parate priti-parate commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Description of the Solution

Summary: Fixes kube_vip group being incorrectly added to orchestrator inventory when Kubernetes is not actually deployed. The kube_vip group is now only added when K8s functional groups (service_kube_*) are defined in the PXE mapping file, which is the definitive indicator that K8s should be deployed.

Changes

generate_inventories role

  • Added validation to check if K8s functional groups exist in PXE mapping file before setting kube_vip
  • Removed dependency on omnia_config.yml deployment flag for kube_vip determination
  • Simplified logic to only check for service_kube_* functional groups in mapping data
  • kube_vip is only set when both HA config exists AND K8s groups are present in mapping

orchestrator_inventory template

  • Updated kube_vip_group conditional logic documentation
  • Template now correctly handles undefined kube_vip variable

Files Changed

File Change Type Description
src/orchestrator/roles/generate_inventories/tasks/main.yml Modified Added K8s functional groups validation in mapping, simplified kube_vip conditions
src/orchestrator/roles/configure_ochami/templates/nodes/orchestrator_inventory.yaml.j2 Modified Updated conditional logic for kube_vip_group

Testing

  • Verified kube_vip group is NOT added when K8s functional groups are absent from PXE mapping
  • Verified kube_vip group IS added when service_kube_* groups are present in mapping and HA config exists
  • Verified template handles undefined kube_vip variable correctly

Backward Compatibility

  • No breaking changes - only fixes incorrect behavior where kube_vip was added when it shouldn't be
  • Existing deployments with K8s functional groups will continue to work as expected
  • Deployments without K8s functional groups will no longer have spurious kube_vip entries

Signed-off-by: priti_parate <priti_parate@dell.com>
Signed-off-by: priti_parate <priti_parate@dell.com>
@priti-parate priti-parate changed the title Issue 4849 omnia modernization fix(orchestrator): add kube_vip group in inventory only when K8s functional groups are defined Sep 4, 2026
@priti-parate
priti-parate marked this pull request as ready for review September 4, 2026 10:46
@abhishek-sa1
abhishek-sa1 merged commit 131ef73 into dell:issue-4849-omnia-modernization Sep 4, 2026
14 checks passed
Kratika-P pushed a commit to Kratika-P/omnia that referenced this pull request Sep 7, 2026
…tional groups are defined (dell#5151)

* Add kube vip group in inventory only when kubernetes cluster is defined

Signed-off-by: priti_parate <priti_parate@dell.com>

* simplify condition to add kube vip in inventory

Signed-off-by: priti_parate <priti_parate@dell.com>

---------

Signed-off-by: priti_parate <priti_parate@dell.com>
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