Skip to content

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

Open

Description

@GrahamDumpleton

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.

Activity

  1. joaopapereira commented on Mar 28, 2022

    @joaopapereira
    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.

  2. GrahamDumpleton commented on Mar 28, 2022

    @GrahamDumpleton
    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.

  3. github-actions commented on May 8, 2022

    @github-actions

    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.

  4. added
    staleThis issue has had no activity for a while and will be closed soon
    on May 8, 2022
  5. GrahamDumpleton commented on May 8, 2022

    @GrahamDumpleton
    Author

    Still interested in this. Go away stale bot.

  6. removed
    staleThis issue has had no activity for a while and will be closed soon
    on May 9, 2022
  7. github-actions commented on Jun 18, 2022

    @github-actions

    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.

  8. added
    staleThis issue has had no activity for a while and will be closed soon
    on Jun 18, 2022
  9. GrahamDumpleton commented on Jun 18, 2022

    @GrahamDumpleton
    Author

    Still interested in this. Go away stale bot.

  10. removed
    staleThis issue has had no activity for a while and will be closed soon
    on Jun 19, 2022
  11. added
    good first issueAn issue that will be a good candidate for a new contributor
    carvel acceptedThis issue should be considered for future work and that the triage process has been completed
    priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.
    and removed
    carvel triageThis issue has not yet been reviewed for validity
    on Jun 23, 2022
  12. moved this to To Triage in Carvelon Jul 25, 2022
  13. moved this from To Triage to Unprioritized in Carvelon Feb 14, 2023
  14. phenixblue commented on Aug 4, 2023

    @phenixblue
    Contributor

    @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.

  15. joaopapereira commented on Aug 4, 2023

    @joaopapereira
    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.

  16. phenixblue commented on Aug 8, 2023

    @phenixblue
    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

Metadata

Metadata

Assignees

Labels

carvel acceptedThis issue should be considered for future work and that the triage process has been completedenhancementThis issue is a feature requestgood first issueAn issue that will be a good candidate for a new contributorpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

Type

No type

Projects

  • Status
    Unprioritized

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions