Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --additional-tag option to imgpkg push. #355

Open
GrahamDumpleton opened this issue Mar 15, 2022 · 9 comments · May be fixed by #553
Open

Add --additional-tag option to imgpkg push. #355

GrahamDumpleton opened this issue Mar 15, 2022 · 9 comments · May be fixed by #553
Assignees
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request good first issue An issue that will be a good candidate for a new contributor priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@GrahamDumpleton
Copy link

Describe the problem/challenge you have

I need to be able to add multiple tags to an image when using imgpkg push -i. For example, I would use an explicit tag based on version or a sha, but at the same time still need the image tagged with latest. At present need to do two runs of imgpkg push with the same input.

          imgpkg push --file . \
            --image ghcr.io/${REPOSITORY}:sha-${REPOSITORY_SHA7} \
            --registry-username=${{github.actor}} \
            --registry-password=${{secrets.GITHUB_TOKEN}}
          imgpkg push --file . \
            --image ghcr.io/${REPOSITORY}:latest \
            --registry-username=${{github.actor}} \
            --registry-password=${{secrets.GITHUB_TOKEN}}

Running imgpkg push twice is inconvenient.

Describe the solution you'd like

Add an --additional-tag option for allowing one or more (list option more than once) tags to the image in addition to the primary tag in the image reference given to --image option.

Anything else you would like to add:

Since imgpkg push already adds a sha256-???.imgpkg tag in addition to the user tag, the mechanics should exist already to do this, so shouldn't be a huge problem.

The name for the option of --additional-tag is inspired by option of same name in skopeo used to add extra tags when copying images.


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 work on this issue.

@GrahamDumpleton GrahamDumpleton added carvel triage This issue has not yet been reviewed for validity enhancement This issue is a feature request labels Mar 15, 2022
@joaopapereira
Copy link
Member

Hello,
Push command is used both with single images and bundles. Is your idea to only have this particular flag to be available when you are doing --image push?

By your description, it does indeed sound like something that we can improve to help your use case.

@GrahamDumpleton
Copy link
Author

I could see this as being useful for bundles as well. Same argument, people may want something tagged as X.Y but still want latest as well for convenience. For development or experimentation using latest in this scenario would be fine so don't have to go work out what actual latest X.Y was. Not everything is production nor need production level guarantees around pinning versions.

@github-actions
Copy link

github-actions bot commented May 8, 2022

This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response.

@github-actions github-actions bot added the stale This issue has had no activity for a while and will be closed soon label May 8, 2022
@GrahamDumpleton
Copy link
Author

Still interested in this. Go away stale bot.

@github-actions github-actions bot removed the stale This issue has had no activity for a while and will be closed soon label May 9, 2022
@github-actions
Copy link

This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response.

@github-actions github-actions bot added the stale This issue has had no activity for a while and will be closed soon label Jun 18, 2022
@GrahamDumpleton
Copy link
Author

Still interested in this. Go away stale bot.

@github-actions github-actions bot removed the stale This issue has had no activity for a while and will be closed soon label Jun 19, 2022
@joaopapereira joaopapereira added good first issue An issue that will be a good candidate for a new contributor carvel accepted This issue should be considered for future work and that the triage process has been completed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed carvel triage This issue has not yet been reviewed for validity labels Jun 23, 2022
@phenixblue
Copy link
Contributor

phenixblue commented Aug 4, 2023

@joaopapereira Is anyone working on this? If not is this something I could work on? I don't think it would be too dissimilar from what I did for labels.

@joaopapereira
Copy link
Member

To the best of my knowledge, no one is working on it. Nevertheless, I just assigned it to you, so feel free to work on it.
This functionality should be added for both bundles and images. It will be roughly in the same area of code.
We only need to remember that even if you push an image/bundle with multiple tags, this story WILL NOT cover the copy of said tags when you execute imgpkg copy. If that is something that people want in the future, we should create a separate issue to address it.

@phenixblue
Copy link
Contributor

Ok, I have a PR up that I believe captures the intent described above.

One thing that I am unsure about is if/how output from the CLI should change. Listing the tags that get pushed seems like a given, but the way the existing output works, it prints the files/directories of the image/bundle (duplicated for each tag that gets pushed). Not a problem really, but not sure if that's something that needs to be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request good first issue An issue that will be a good candidate for a new contributor priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
Status: Unprioritized
Development

Successfully merging a pull request may close this issue.

3 participants