# imgpkg testing ## Findings # UX Stdout * (L) ./imgpkg copy prints out stdout in a table format. i.e. `copy | exporting 2 images...` ./imgpkg pull does not print out stdout in a table format. i.e. `Pulling image 'index.docker.io/k8slt/sample-bundle-name1@sha256:1e6f13d228e1cc840d9cafd5f734328c0f2604a27688b91ef0d7611110ab8f3a'` * (L) The INFO message print out from the ./imgpkg pull command could use some re-wording. Specifically `All images found in bundle repo; updating lock file: /tmp/sample-bundle-2/.imgpkg/images.yml` * (L) There is a lot of text from the imgpkg copy command. This should be improved as part of #173968559 * (H) When using the old kbld lock file format that has`kind: Config` imgpkg does not fail, instead it ignores it and every command succeeds. * This is an issue when doing air-gapped relocation since all images references will not be updated with the internal registry. * You can get the old lock format by running with newest kbld version 0.27.0: `kbld -f /tmp/helm-app/contents/manifests.yml --lock-output /tmp/helm-app/.imgpkg/images.yml` * (M) When using imgpkg copy to copy to a registry that does not exist or you are not authenticated to, the error message below is a bit confusing. It might be nice to have a more explicit message about not being authorized. ``` Error: Importing image index.docker.io/danielhelfand/lab-tekton-fundamentals:latest: Importing image as index.docker.io/library/quay.io@sha256:2ddcd1e020d5b18a48bac7f9a088d070b089ebd2a7b6aa8d7faede6343a41c95: Writing image: Retried 5 times: HEAD https://index.docker.io/v2/library/quay.io/blobs/sha256:38ec5d40f70be4d691a23edc086b807f44a37ae3a10b198007755eaf8c2126d2: unsupported status code 401 ``` * (M) No way to generate a "bootstrap" .imgpkg directory with Bundle/ImagesLock before working with Bundle. * (M/L) --file/-f does not support remote files (like kbld) (e.g. https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.18.1/release.yaml) # Docs * (L) Use a real public image reference in the documentation. for e.g. https://github.com/vmware-tanzu/carvel-imgpkg/blob/develop/docs/resources.md#imageslock references an image (docker.io/my-app) that does not exist. Instead use an image that does exist. * (L) There are no docs for using imgpkg with helm charts. * (M) Link to or create docs on how to create an image.yml file using kbld. * (M) Provide details on logging into dockerhub instead of local registry? Mention dockers purpose with imgpkg. * (L) Workflow starts with bundles before images * (H) Update description in basic-workflow.md of the lock file update from "was not updated since the bundle has never been pushed to the Docker registry before" to explain that the file wasn't updated because the referenced images are not in the same registry, (which only happens when a bundle is copied * (L) Document what 'annotations' key in ImageLock means https://github.com/vmware-tanzu/carvel-imgpkg/blob/develop/docs/basic-workflow.md#how-to-retrieve-the-relocated-bundle * (L) Mention that the imageLock file must be named `images.yml` **and** that it is required. # Flags * copy * --registry-anon - We were not 100% sure what this flag does, even after reading the description. * --lock Dennis had no idea what this meant from the flag name. it made sense after reading the description. Probably ok to keep the name as-is though. * --registry-ca-cert-path change wording to be consistent with other flags that expect a path. i.e. --from-tar * push * --file wasn't clear (even after reading the description) what kind of file it was expecting. a tarball or the bundle directory * **(H!!!)** --file-exclude-defaults we wern't sure what this flag does from the name alone. the description helped us understand it. However we are also confused with the usage of the word 'default' in both the flag name and in the description. Specifically, if this is a list of directories to exclude, then it isn't 'default'. * **(H!!)** --file-raw-tar we were not sure what a 'raw' tarball is. but we are also not sure whether this is a 'correct' industry term for a specific type of tarball. * --image it wasn't clear the difference between an image and a bundle, or what the 'source' of an image was. * help output * imgpkg push --help Add that pushing bundles is also possible. # Questions * Should docs live in the website repository? # Bugs ### (H) When testing cf-for-k8s with the latest version of imgpkg: We got the following error: * Latest version of IMGPKG 6740b503d560e9a455f476e331ea8d05de00604f * `imgpkg copy -b k8slt/cf-for-k8s-test --to-repo k8slt/cf-for-k8s-copied-cari-1` ``` ... copy | imported 15 images Error: Importing image index.docker.io/cloudfoundry/cloud-controller-ng@sha256:c18c3c556c4fd2ca7de8d01984dc30beb7764f0559f1df0f8918007de2023259: Importing image as index.docker.io/k8slt/cf-for-k8s-copied-cari-1@sha256:c18c3c556c4fd2ca7de8d01984dc30beb7764f0559f1df0f8918007de2023259: Writing image: Retried 5 times: Patch "https://index.docker.io/v2/k8slt/cf-for-k8s-copied-cari-1/blobs/uploads/45818b17-251b-4f5d-b4b9-70543a50a156?_state=in7DvPeU-kqOi-uOk_x9JSKR73AThhHExoerDSam0S97Ik5hbWUiOiJrOHNsdC9jZi1mb3ItazhzLWNvcGllZC1jYXJpLTEiLCJVVUlEIjoiNDU4MThiMTctMjUxYi00ZjVkLWI0YjktNzA1NDNhNTBhMTU2IiwiT2Zmc2V0IjowLCJTdGFydGVkQXQiOiIyMDIwLTEyLTAxVDAwOjUzOjIxLjIxMDU5MDY3NloifQ%3D%3D": write tcp 192.168.1.52:52630->52.55.43.248:443: use of closed network connection ``` --- After I deleted all my local docker images, and ran the command again, it succeeded... However, in between exporting and importing these warnings appeared: * Latest version of IMGPKG 6740b503d560e9a455f476e331ea8d05de00604f * `imgpkg copy -b k8slt/cf-for-k8s-test --to-repo k8slt/cf-for-k8s-copied-cari-2` ``` ... copy | will export index.docker.io/paketobuildpacks/run@sha256:4e8d3b99e4c78c5d2f7ccac1ed798393442bf623de6e5f7119831d7e4a10a8d1 WARNING: Could not store access token in cache: database is locked WARNING: Could not store access token in cache: database is locked WARNING: Could not store access token in cache: database is locked WARNING: Could not store access token in cache: database is locked copy | exported 43 images copy | importing 43 images... copy | importing index.docker.io/cloudfoundry/eirini-task-reporter-cf-for-k8s@sha256:2715ac192d671788f2512cf116ac9b483402e477af3d9481724cc40134363d61 -> index.docker.io/k8slt/cf-for-k8s-copied-cari-2@sha256:2715ac192d671788f2512cf116ac9b483402e477af3d9481724cc40134363d61... ... ```