Harbor PackageInstall (pkgi) fails to reconcile in Tanzu Kubernetes Grid (TKG) environments following a cluster upgrade. The reconciliation status remains in ReconcileFailed with a ytt overlay error specifically referencing podAnnotations.
Symptoms:
kubectl get pkgi -n tkg-system harbor shows status Reconcile failed.kubectl describe pkgi harbor -n tkg-system displays the following error: ytt: Error: - library.eval: Evaluating library 'bundle/config': Overlaying data values... Document on line ?: Map item (key 'podAnnotations') on line ?: Expected number of matched nodes to be 1, but was 0Harbor Package 2.14.3+vmware.2-vks.1 or similar
kubectl get pkgi harbor -n tkg-system -o yaml (Look for values.secretRef names, e.g., harbor-tkg-system-values).kubectl get secret harbor-tkg-system-values -n tkg-system -o jsonpath='{.data.values\.yaml}' | base64 -d > harbor-values-backup.yamlpodAnnotations and metrics blocks from the root level of the values.yaml content.kubectl create secret generic harbor-tkg-system-values -n tkg-system --from-file=values.yaml=harbor-values.yaml --dry-run=client -o yaml | kubectl apply -f -kubectl patch pkgi harbor -n tkg-system --type merge -p '{"spec":{"paused":true}}' kubectl patch pkgi harbor -n tkg-system --type merge -p '{"spec":{"paused":false}}'kubectl get pkgi harbor -n tkg-system