Harbor Repository for Tanzu BYOH
VMware provides documentation for preparing a Harbor repository that can be leveraged to install both Tanzu Kubernetes Grid management and workload clusters. The official documentation is available here.
In my efforts to leverage the Tanzu BYOH bits within an internet-restricted environment, I found several caveats to the above documentation. These steps should be followed if you are building clusters within similar conditions.
As of October 2022, the TKG v1.6 documentation has an issue with several of the packages that need to be downloaded leveraging the download-images.sh script the official documentation has you run as part of Step 3. During Step 2, you generate a list of all of the packages upstream that need to be downloaded and placed on your local Harbor repository. There are two packages that have the wrong syntax that need to be modified in the images-copy-list file you created. The following commands will update each occurrence the capabilities and tkg-storageclass packages are referenced in the file.
bootstrap$ sed -i 's/copy -i projects.registry.vmware.com\/tkg\/packages\/capabilities:v0.25.0-23-g6288c751_vmware.1/copy -b projects.registry.vmware.com\/tkg\/packages\/capabilities:v0.25.0-23-g6288c751_vmware.1/g' images-copy-list
bootstrap$ sed -i 's/copy -i projects.registry.vmware.com\/tkg\/packages\/tkg-storageclass:v0.25.0-23-g6288c751_vmware.1/copy -b projects.registry.vmware.com\/tkg\/packages\/tkg-storageclass:v0.25.0-23-g6288c751_vmware.1/g' images-copy-list
bootstrap$ imgpkg copy -i gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 --to-repo harbor.home.virtualelephant.com/tanzu/kubebuilder/kube-rbac-proxy --registry-ca-cert-path /usr/local/share/ca-certificates/home.virtualelephant.com.crt
bootstrap$ imgpkg copy -i projects.registry.vmware.com/cluster_api_provider_bringyourownhost/byoh-bundle-ubuntu_20.04.1_x86-64_k8s --to-repo harbor.home.virtualelephant.com/tanzu/cluster_api_provider_bringyourownhost/byoh-bundle-ubuntu_20.04.1_x86-64_k8s --registry-ca-cert-path /usr/local/share/ca-certificates/home.virtualelephant.com.crt
bootstrap$ imgpkg copy -i projects.registry.vmware.com/cluster_api_provider_bringyourownhost/cluster-api-byoh-controller:v0.3.0 --to-repo harbor.home.virtualelephant.com/tanzu/cluster_api_provider_bringyourownhost/cluster-api-byoh-controller:v0.3.0 --registry-ca-cert-path /usr/local/share/ca-certificates/home.virtualelephant.com.crt
bootstrap$ docker pull antrea/antrea-ubuntu:latest
bootstrap$ docker tag antrea/antrea-ubuntu:latest harbor.home.virtualelephant.com/tanzu/antrea/antrea-ubuntu:latest
bootstrap$ docker push -a harbor.home.virtualelephant.com/tanzu/antrea/antrea-ubuntu