Standard Packages fail to reconcile with error "Reconcile failed: Package <name of the package> not found"
search cancel

Standard Packages fail to reconcile with error "Reconcile failed: Package <name of the package> not found"

book

Article ID: 429783

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

  • In a VKS environment, standard packages such as cert-manager, harbor and contour fail to reconcile.

  • On further investigating the status of the PackageInstall (pkgi) resources, the following error is observed in the description field.

    Reconcile failed: Package <package-name>.tanzu.vmware.com not found

  • Below is how the output of the command "kubectl get pkgi -A" might look like. Notice that the packages within the "custom" namespace fail to reconcile whereas the packages within the system namespace vmware-system-tkg reconcile successfully. The below command output shows an example output of the packages whose reconciliation has failed within the custom namespace.

    NAMESPACE                  NAME                                              PACKAGE NAME                                    PACKAGE VERSION               DESCRIPTION                                                       
    <custom namespace>         cert-manager                                      cert-manager.tanzu.vmware.com                   1.7.2+vmware.1-tkg.1          Reconcile failed: Package cert-manager.tanzu.vmware.com not found   
    <custom namespace>         contour                                           contour.tanzu.vmware.com                        1.20.2+vmware.2-tkg.1         Reconcile failed: Package contour.tanzu.vmware.com not found        
    <custom namespace>         harbor                                            harbor.tanzu.vmware.com                         2.6.1+vmware.1-tkg.1          Reconcile failed: Package harbor.tanzu.vmware.com not found     

Environment

vSphere Kubernetes Service

Cause

The PackageInstall resources are located in a namespace that does not have access to the required PackageRepository.

A PackageInstall can only reference packages from a PackageRepository that is either.

  1. Installed in the same namespace as the PackageInstall.

  2. Installed as a global repository, provided that the kapp-controller is able to view it.

Especially in situations with the legacy repositories, if the same is present in one namespace (e.g., tanzu-package-repo-global), but the packages are deployed into a custom namespace (e.g, my-packages) the repository is neither mirrored nor globally accessible to that specific custom namespace's scope.

Resolution

To resolve this issue, add the concerned Standard Package Repository to the namespace where the packages are being installed.

  • Identify the current repository location.

    vcf package available list -n REPOSITORY-NAMESPACE 

  • Add the repository to the failing namespace: Replace <target-namespace> with the namespace where your packages are failing (e.g., my-packages).

    vcf package repository add REPOSITORY-NAME --url REPOSITORY-URL -n REPOSITORY-NAMESPACE

  • Verify the repository status.

    vcf package repository get <repo-name> --namespace <target-namespace>

Additional Information

Manage Package Repository