In Workload Management (WCP) and vSphere Kubernetes Service (VKS), when the same local content library is associated with multiple namespaces, deleting any of those namespaces or unlinking the local content library from one of the namespaces will lead to the deletion of all templates from that local content library.
For a local content library associated with multiple namespaces in a Supervisor cluster, if one namespace is deleted or unlinks the local content library, it will also affect other namespaces in the Supervisor cluster.
Deletion or removal of the local content library from one of the multiple namespaces using the same local content library will result in deletion of OVF templates that were uploaded to the same local content library.
When OVF templates are missing, the Supervisor cluster will not be able to populate available cluster virtual machine images or Kubernetes Releases.
Without available cluster virtual machine images or Kubernetes Releases, new clusters and nodes cannot be provisioned.
This impacts node creation including new clusters, scaling node operations and rolling redeployments.
This is a known bug introduced by the Image Registry Service feature starting in vCenter 8.0u2.
vSphere Supervisor 8.0 Release Notes under "Templates might get deleted from the Content Library in vCenter when the library is linked to multiple vSphere namespaces"
The issue was fixed in the vCenter 8.0.2 MP1 release.
Because the fix is part of the Image Registry Operator component which runs on the Supervisor cluster, the Supervisor cluster must be upgraded to implement the fix.
High-Level Overview:
This will prevent changes made to the content library in one namespace, or the deletion of a namespace from deleting OVF templates in the content library.
Connect to the Supervisor cluster context
kubectl get contentsources -A
kubectl get cvmi
kubectl get tkr,kr
The image registry operator pod on Supervisor control plane would contain the following log which indicates that the library item was deleted from the Content Library in vCenter, where the values enclosed in <> vary by environment:
YYYY-MM-DDTHH:MM:SS.sssssssssZ stderr F IMMDD HH:MM:SS.ssssss 1 contentlibraryitem_controller.go:351] controllers/ContentLibraryItem "msg"="Deleted library item in VC" "ID"="<content library id>" "clItemName"="<content library item id>"