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

added list-repos flag #298

Merged
merged 3 commits into from
Aug 23, 2024
Merged

Conversation

zackbradys
Copy link
Member

@zackbradys zackbradys commented Aug 20, 2024

Please check below, if the PR fulfills these requirements:

  • Commit(s) and code follow the repositories guidelines.
  • Test(s) have been added or updated to support these change(s).
  • Doc(s) have been added or updated to support these change(s).

Associated Links:

  • N/A

Types of Changes:

  • Feature

Proposed Changes:

  • Added a flag --list-repos to hauler store info to output the list of repositories within hauler to ease the burden for enterprise applications like container registries such as ECR or harbor
  • --list-repos also works with --output/-o and --type/-t
zackbradys@Zacks-MBP hauler % ./bin/hauler store info                                                                                                 
+----------------------------------------+-------+----------------+----------+----------+
| REFERENCE                              | TYPE  | PLATFORM       | # LAYERS | SIZE     |
+----------------------------------------+-------+----------------+----------+----------+
| bitnami/harbor-registry:latest         | image | linux/amd64    |        1 | 52.2 MB  |
|                                        | image | linux/arm64    |        1 | 51.3 MB  |
| hauler/install.sh:latest               | file  | -              |        1 | 25.0 kB  |
| hauler/rancher-cluster-templates:0.5.2 | chart | -              |        1 | 15.0 kB  |
| hauler/rancher:2.8.2                   | chart | -              |        1 | 15.0 kB  |
| library/busybox:latest                 | image | linux/386      |        1 | 2.2 MB   |
|                                        | image | linux/amd64    |        1 | 2.2 MB   |
|                                        | image | linux/arm      |        1 | 949.0 kB |
|                                        | image | linux/arm      |        1 | 1.6 MB   |
|                                        | image | linux/arm      |        1 | 1.8 MB   |
|                                        | image | linux/arm64    |        1 | 1.8 MB   |
|                                        | image | linux/mips64le |        1 | 2.1 MB   |
|                                        | image | linux/ppc64le  |        1 | 2.5 MB   |
|                                        | image | linux/riscv64  |        1 | 895.2 kB |
|                                        | image | linux/s390x    |        1 | 1.9 MB   |
+----------------------------------------+-------+----------------+----------+----------+
|                                                                    TOTAL   | 121.4 MB |
+----------------------------------------+-------+----------------+----------+----------+
zackbradys@Zacks-MBP hauler % ./bin/hauler store info --list-repos         
hauler
bitnami
library
zackbradys@Zacks-MBP hauler % ./bin/hauler store info --list-repos --type image
library
bitnami
zackbradys@Zacks-MBP hauler % ./bin/hauler store info --list-repos --type file  
hauler

Verification/Testing of Changes:

  • Clone the repository and locally build hauler and run hauler store info --list-repos

Additional Context:

  • N/A

@zackbradys zackbradys self-assigned this Aug 20, 2024
@zackbradys zackbradys added enhancement New feature or request size/S Denotes an issue/PR requiring a relatively small amount of work labels Aug 20, 2024
@zackbradys zackbradys added this to the Hauler v1.1.0 milestone Aug 20, 2024
@zackbradys zackbradys requested a review from a team August 20, 2024 04:02
Copy link
Contributor

@atoy3731 atoy3731 left a comment

Choose a reason for hiding this comment

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

LGTM.

[09:24:36] /tmp/hauler/bin [added-list-repos-flag] $ ./hauler store info
+------------------------+-------+---------------+----------+----------+
| REFERENCE              | TYPE  | PLATFORM      | # LAYERS | SIZE     |
+------------------------+-------+---------------+----------+----------+
| hauler/hauler:latest   | file  | -             |        1 | 186.9 MB |
| library/ubuntu:latest  | image | linux/amd64   |        1 | 29.7 MB  |
|                        | image | linux/arm     |        1 | 26.8 MB  |
|                        | image | linux/arm64   |        1 | 28.8 MB  |
|                        | image | linux/ppc64le |        1 | 34.5 MB  |
|                        | image | linux/riscv64 |        1 | 30.9 MB  |
|                        | image | linux/s390x   |        1 | 30.0 MB  |
| rancher/rancher:v2.8.3 | image | linux/amd64   |       21 | 963.6 MB |
|                        | image | linux/arm64   |       21 | 942.0 MB |
+------------------------+-------+---------------+----------+----------+
|                                                   TOTAL   |  2.3 GB  |
+------------------------+-------+---------------+----------+----------+
[09:24:39] /tmp/hauler/bin [added-list-repos-flag] $ ./hauler store info --list-repos
hauler
library
rancher

@atoy3731 atoy3731 merged commit bd0cd8f into hauler-dev:main Aug 23, 2024
1 check passed
@zackbradys zackbradys deleted the added-list-repos-flag branch August 23, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/S Denotes an issue/PR requiring a relatively small amount of work
Projects
Status: Resolved
Development

Successfully merging this pull request may close these issues.

2 participants