carvel-dev / carvel-dev/imgpkg

Annotations in lock file is not preserved during going from tar->registry.

Open
#217 15 comments 3 reactions 0 assignees View on GitHub
bug carvel accepted priority/important-longterm
Dominant language
Go
Stars
284
Forks
70
PR merge metrics
No merged PRs in 30d

Description

**What steps did you take:**
The goal is I want to install a helm chart to a offline env using kbld and imgpkg to reallocate the images. The procedure I thought in mind was...
```
helm template hoge hoge/foo > manifests/bar.yaml
kbld -f manifests/ --imgpkg-lock-output /tmp/image-lock.yaml
imgpkg copy --lock /tmp/image-lock.yaml --to-tar /tmp/images.tar
--- Go to offline env ----
imgpkg copy --tar /tmp/images.tar --to-repo --lock-output /tmp/image-offline-lock.yaml
helm template hoge hoge/foo | kbld -f- -f /tmp/image-offline-lock.yaml
```
but the last commands errors with the following.

```
ubuntu@ubuntu-449:~$ helm template argo argo/argo-cd | kbld -f- -f /tmp/image-offline-lock.yaml
kbld: Error: Validating imageslock/ (imgpkg.carvel.dev/v1alpha1) cluster:
Validating Overrides[0]:
Expected Image or ImageRepo to be non-empty
```
Annotations are missing in `/tmp/image-offline-lock.yaml`

```
buntu@ubuntu-449:~$ cat /tmp/image-offline-lock.yaml
---
apiVersion: imgpkg.carvel.dev/v1alpha1
images:
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:5e88f2205de172b60fd7af23ac92f34321688a83de9f7de7c9a6f394f6950877
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:2defd45426be3b5bc7415455ca529c910dab7473717eeece9c3cc26efa5ca037
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:6b10107669332f3f68b659f3f13ce33c869d2dcaacdd64fd3e6cf0a7d98b9cd7
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:044559541242562493957ab02c3ff7a9a55b8571aa2c8d98e0557b189c2d3968
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:e5399090dd46c83d0d5c6f8941f34d87a47ca54fda89221c1dabd2f5beb7ed15
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:1f22f3fb44446f752e1457d9b1612d08dc6a808c267fee3ef0488959be83c2a1
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:ca760f94b35eb78575b170e41d1e19e27359b29245dacfd1c42ae90452ecc08e
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:0f354ec1728d9ff32edcd7d1b8bbdfc798277ad36120dc3dc683be44524c8b60
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:0039796b887fd30e460353f14e46ba1004152aa97f5f59094cc21eac445fc89b
- image: harbor.lespaulstudioplus.info/library/imgpkg-demo@sha256:b53a2f76f949849cbe7e0b1e343a2076c7f205cfcfe8116e461e6861369fa81f
kind: ImagesLock
```

**What happened:**
Annotations were lost during tar->registry imgpkg

**What did you expect:**
Annotations should be preserved

**Environment:**

- imgpkg version : 0.17
- Docker registry used (e.g. `Docker HUB`): harbor
- OS (e.g. from `/etc/os-release`): 18.04.5 LTS (Bionic Beaver)

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.