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

Option to report just images from old repository aka --plain command line option #48

Conversation

dims
Copy link
Member

@dims dims commented Mar 22, 2023

Feature added for #47

  • Adding a --plain command line argument to just print images with no fancy decorations so that the output is parsable (one image:tag per line)
  • fix a bug found during testing (see commit message for details - tl;dr deal better with duplicate images)

dims added 2 commits March 22, 2023 09:27
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
If there were images with the same SHA from different registries
we were not reporting things properly

For example AFTER this fix, we can see the following, before the fix
the image from the old registry was not displayed to the user
```
 ✅ registry.k8s.io/library/busybox:latest (Location: default > hello-world2 > hello-world2)
 ❌ k8s.gcr.io/library/busybox:latest (Location: default > hello-world3 > hello-world3)
```

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 22, 2023
@dims dims changed the title Option to report just images from old repository Option to report just images from old repository aka --plain command line option Mar 22, 2023
@dims
Copy link
Member Author

dims commented Mar 22, 2023

/assign @nikhita @MadhavJivrajani @palnabarun

Copy link
Contributor

@MadhavJivrajani MadhavJivrajani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 22, 2023
Copy link
Member

@nikhita nikhita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, MadhavJivrajani, nikhita

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 0f2a9b5 into kubernetes-sigs:main Mar 22, 2023
@BenTheElder
Copy link
Member

Option to report just images from old repository aka --plain command line option

Thanks dims!

WDYT about a command or option to report images from registry.k8s.io?

@dims
Copy link
Member Author

dims commented Mar 22, 2023

@BenTheElder what do want folks to use that for? (ideas on what we would call it?)

@BenTheElder
Copy link
Member

I'm not sure what to call it but if I had an easy way to list what kubernetes provided images are in a cluster it would make it easy to start mirroring them, and I'd add this to our mirroring guide under "identifying images to mirror" as the default solution

@BenTheElder
Copy link
Member

That's a bit distinct from "you should stop using these old image hosts" but I imagine it's largely the same code

@BenTheElder
Copy link
Member

Could imagine a shell one liner even to pipe these to [g]crane and mirror to your own host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants