Tanzu Package Reconciliation Fails with Expected to find at least one version, but did not Due to Missing Package in Harbor Repository
search cancel

Tanzu Package Reconciliation Fails with Expected to find at least one version, but did not Due to Missing Package in Harbor Repository

book

Article ID: 451561

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service VMware Cloud Foundation

Issue/Introduction

When deploying or upgrading Tanzu standard packages (such as Grafana, Cert-Manager, or Prometheus), the package installation fails to reconcile.

Running tanzu package installed get <package-name> -n <namespace> or inspecting the underlying PackageInstall resource shows the following status error:

STATUS: Reconcile failed

CONDITIONS:   - message: 'Expected to find at least one version, but did not (details: all=X -> after-prereleases-filter=X -> after-kapp-controller-version-check=X -> after-constraints-filter=0)'    status: "True"    type: ReconcileFailed

Verification Steps

To confirm if the package files are missing from your repository bundle image:

  1. Pull and unpack the repository bundle metadata from Harbor to a local temporary directory:

         imgpkg pull -b ######/tkg/packages/standard/repo:##.##.## -o /tmp/repo-bundle

  1. Inspect the contents of the unpacked packages directory:

        ls -la /tmp/repo-bundle/packages/ | grep grafana

If this command returns no output, the package bundle was pushed incompletely or corrupted during transfer to Harbor.

Environment

VMware vSphere Kubernetes Service

Cause

The kapp-controller daemon uses the cluster's PackageRepository custom resource to fetch package bundle metadata from your private Harbor registry (e.g., #####/tkg/packages/standard/repo:##.##.##).

This error occurs when either:

  1. The target package directory (e.g., tanzu.vmware.com) is completely missing from the pushed repository bundle in Harbor.
  2. The specific package version requested by the PackageInstall resource is not contained within the synced repository bundle.

Resolution

To resolve this issue, re-upload the complete Tanzu standard package repository bundle to Harbor and force kapp-controller to re-synchronize.

Step 1: Re-upload the Package Repository Bundle From the jump host or administrative machine containing the valid repo-bundle.tar archive, push the bundle to Harbor using imgpkg.

Note: Ensure you do not include the tag inside the --to-repo path, or use --to-repo-tag explicitly.

imgpkg copy --tar repo-bundle.tar --to-repo #####/tkg/packages/standard/repo

Step 2: Update Package Installations to Available Versions If the package versions in your cluster differ from those provided by the new repository, update the installed package specs accordingly:

tanzu package installed update <INSTALLED_PACKAGE_NAME> \
  --package-name <PACKAGE_NAME_ID> \
  --version <TARGET_PACKAGE_VERSION> \
  -n <TARGET_NAMESPACE>

Step 3: Force Package Re-synchronization Force kapp-controller to bypass its cached reconciliation timer and re-evaluate the repository metadata immediately by toggling the paused state:

kubectl patch packageinstall/<INSTALLED_PACKAGE_NAME> -n namespace -p '{"spec":{"paused":true}}' --type=merge 

 

 

kubectl patch packageinstall/<INSTALLED_PACKAGE_NAME> -n namespace -p '{"spec":{"paused":false}}' --type=merge

Step 4: Verify Resolution Confirm that the status transitions to Reconcile succeeded:

kubectl get packageinstall -n namespace

Alternatively, list all packages cluster-wide using the Tanzu CLI: tanzu package installed list -A