✨ Tag Controller for Assignment of Tags to VMs - #1807
Conversation
73befc8 to
f1b293a
Compare
d3bf323 to
1bb601c
Compare
|
📝 CL Summary: This PR introduces a new namespace-scoped |
|
|
||
| vCenter Tags are identified by name **and** category, and are unique across that combination. Every vCenter Tag backing this feature uses the **namespace name** as its Tag Category, derived from the `Tag`'s own namespace — the category is not a separate user-settable field. | ||
|
|
||
| Attributes: |
There was a problem hiding this comment.
🟡 Medium: The use of 'ownerReferences' for Tag ownership may hit Kubernetes object size limits (1.5MB) in namespaces with a very large number of VMs (thousands) referencing the same common label (e.g., 'env=prod'). Each reference consumes metadata space; consider a more scalable ownership tracking mechanism if high-density namespaces are a target use case.
1bb601c to
8f85dd3
Compare
Minimum allowed line rate is |
What does this PR do, and why is it needed?
Introduces a new namespace-scoped Tag CRD (vsphere.policy.vmware.com/v1alpha1) and a Tag controller to drive vCenter Tag-based VM affinity/anti-affinity. Today, labels are only converted to vCenter Tags for a VM that itself declares spec.affinity referencing them, and only at create time — so a VM carrying a participating label but no affinity of its own is never tagged and can't be targeted by another VM's affinity rule.
This change tracks which label key/value pairs currently participate in affinity and which VMs own that participation, then tags every VM in the namespace carrying a participating label (not just affinity-declaring VMs), re-converging on every reconcile rather than only at create.
This PR is part of a 4 part change
This PR includes:
Other parts:
Which issue(s) is/are addressed by this PR? (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Are there any special notes for your reviewer:
Please add a release note if necessary: