fix: use NutanixCluster name for PC resources - #796
Merged
Merged
Conversation
thunderboltsid
approved these changes
Sep 23, 2026
vijayaraghavanr31
approved these changes
Sep 23, 2026
abhay-nutanix
force-pushed
the
issue/identicalResources
branch
from
September 23, 2026 08:13
2ac27fd to
a99c44f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Name new NutanixVirtualHADomain objects from the NutanixCluster instead of the CAPI Cluster. vHA categories, recovery plans, and protection policies take their Prism Central names from that object, so they follow the NutanixCluster as well.
Greenfield
A new metro cluster creates a NutanixVirtualHADomain named {NutanixCluster}-{metro}. Categories, recovery plans, and the protection policy are created from that name. Two clusters on the same metro still get distinct objects, because the NutanixCluster name is part of the object name.
A new non-metro cluster still creates KubernetesClusterName with the CAPI Cluster name when the first VM is created. Delete looks that category up by the NutanixCluster name, so cleanup matches only when those two names are the same.
Brownfield
An existing NutanixVirtualHADomain is found by its metro reference and is not renamed. Its categories, recovery plans, and protection policy stay on the previous {CAPI Cluster}-{metro} stem. There is no migration of Prism Central resources.
An existing non-metro cluster already has KubernetesClusterName=. After upgrade, delete looks for KubernetesClusterName=. When those names differ, the category created before this change is left in Prism Central. The obsolete kubernetes-io-cluster-* category is still deleted using the CAPI Cluster name.