Brandon Mitchell
fa8d4c61b6
Feat: regctl flag to ignore missing images on delete
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-03-31 16:30:29 -04:00
Brandon Mitchell
5c7545ec32
Feat: regsync option to abort on errors
...
This stops regsync from retrying with backoffs when a registry is failing.
Multiple errors are also joined using "errors.Join".
Errors from the canceled context are not propagated up.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-03-18 10:51:23 -04:00
Brandon Mitchell
e9a21b954f
Feat: Improve regctl image check-base output
...
Output makes it more apparent when the base image has changed.
Tests were added, which required some work to pass through "regclient.Opts".
The empty error message is also suppressed to avoid an extra linefeed to stderr.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-03-05 17:28:10 -05:00
Brandon Mitchell
288f2c3da0
Chore: Refactor cobra commands
...
This helps align the different commands with each other.
- Variable names have been improved to be less confusing.
- Flags have been sorted, and completion options added on some flags where missing.
- Each command creates its own options to avoid default flag value conflicts.
- Reusing a command under two paths is now done by calling that commands "new" function.
- Global-but-not-really-global options have been moved to be associated with the specific commands that use them.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-02-27 11:07:58 -05:00
Brandon Mitchell
ce20c40991
Feat: Adding a whoami command
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-02-20 15:09:59 -05:00
Brandon Mitchell
260bef6f38
Fix: Validate registry names
...
The previous fix only validated registry names in the auths section of the docker config.
This also validates names listed in the credential helper or returned from the credential store.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-02-19 11:12:23 -05:00
Brandon Mitchell
95c9152941
Chore: Modernize Go to the 1.22 specs
...
- Use "any" instead of an empty interface.
- Use range over an integer for for loops.
- Remove shadow variables in loops now that Go no longer reuses the variable.
- Use "slices.Contains", "slices.Delete", "slices.Equal", "slices.Index", "slices.SortFunc".
- Use "cmp.Or", "min", and "max".
- Use "fmt.Appendf" instead of "Sprintf" for generating a byte slice.
- Use "errors.Join" or "fmt.Errorf" with multiple "%w" for multiple errors.
Additionally, use modern regclient features:
- Use "ref.SetTag", "ref.SetDigest", and "ref.AddDigest".
- Call "regclient.ManifestGet" using "WithManifestDesc" instead of setting the digest on the reference.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-02-18 14:32:06 -05:00
Brandon Mitchell
b0cf1a63e0
Fix: interval overrides a default schedule
...
This affects both regbot and regsync where setting a default schedule would override a sync/script specific interval.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-02-02 14:51:33 -05:00
Brandon Mitchell
35faa531d9
Fix: Align log levels with slog
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-01-24 14:24:31 -05:00
Brandon Mitchell
bbb902ba69
Feat: Add cobra command for documentation
...
This will be used for generating website content.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-01-22 15:14:22 -05:00
Brandon Mitchell
aebf0be231
Feat: Improve regctl arg completion
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2025-01-10 17:06:10 -05:00
Brandon Mitchell
851cc63093
Feat: Support external referrers in regsync
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-12-08 16:30:27 -05:00
Brandon Mitchell
906465a072
Chore: Remove unused short arg parameters
...
This simplifies the various cobra flags to only specify a short arg when it is used.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-12-06 10:25:54 -05:00
Brandon Mitchell
ead52eb575
Feat: Copy image with external referrers
...
This supports both external source and target repositories for referrers.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-12-04 17:01:12 -05:00
Brandon Mitchell
c20bd15904
Feat: Add external flag to regctl artifact put
...
This aligns the CLI with other regctl artifact commands.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-12-04 15:15:06 -05:00
Brandon Mitchell
763599514d
Feat: Include source in referrers response
...
This simplifies handling external sources.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-12-03 17:12:10 -05:00
Brandon Mitchell
5063cffc59
Feat: Image mod environment variables
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-11-30 10:17:32 -05:00
Brandon Mitchell
a8a9640fec
Feat: Support referrers in an external repository
...
This allows organizations to maintain a repository of referrers separate from the upstream images.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-11-29 15:42:44 -05:00
Brandon Mitchell
f5f7fe6d2c
Chore: Improve error message when inspecting artifacts
...
Artifacts can have their configuration retrieved with "regctl artifact get --config".
This also improves test coverage.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-11-22 10:31:34 -05:00
Brandon Mitchell
289533b02c
Feat: Move logrus calls into files excluded by wasm
...
This permits builds of wasm binaries.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-11-12 10:18:47 -05:00
Brandon Mitchell
02aefed48a
Switch regsync to slog
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-11-11 16:41:33 -05:00
Brandon Mitchell
4b3b8c1e5b
Feat: Switch regctl to slog
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-11-11 14:57:30 -05:00
Brandon Mitchell
3756788d13
Feat: Switch regbot to slog
...
This also consolidated the trace logging level to a single definition.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-11-11 13:24:54 -05:00
Brandon Mitchell
f09f252c6f
Fix: Detect integer overflows on type conversion
...
This removes a few gosec overrides.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-10-04 16:42:40 -04:00
Brandon Mitchell
9406c997b3
Version bump
...
- ECR Helper to latest commit
- GCloud Helper to v2.1.25
- securego/gosec to v2.21.1
- Alpine to 3.20.3
- Go to 1.23.1
- davidanson/markdonlint-cli2 to v0.14.0
- golang.org/x/sys to v0.25.0
- golang.org/x/term to v0.24.0
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-08 10:41:24 -04:00
Brandon Mitchell
17434c3c7b
Feat: Add default host config
...
In regctl, this exposes a flag to set the default credential helper.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-09-06 17:00:46 -04:00
Brandon Mitchell
dfef163cd5
Chore: Refactor to remove globals in regbot
...
This also removes another usage of the internal throttle package in preparation for its removal.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-30 11:03:49 -04:00
Brandon Mitchell
057670b133
Chore: Refactoring to remove globals in regsync
...
This also removes another usage of the internal throttle package in preparation for its removal.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-30 10:35:24 -04:00
Brandon Mitchell
89be757fd0
Feat: Consolidate warnings
...
When a registry returns a warning header on every request, clients should try to consolidate these.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-22 16:52:40 -04:00
Brandon Mitchell
4bd605f9ef
Chore: Remove ReqPerSec in tests
...
This is no longer needed to speed up tests since request per second does not have a default setting.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-20 16:08:19 -04:00
Brandon Mitchell
d53ff8155b
Chore: Update staticcheck and fix linter warnings for Go 1.23
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-08-13 15:01:50 -04:00
Brandon Mitchell
cedfa5aae5
Option to output config with regctl artifact get
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-07-26 15:50:27 -04:00
Brandon Mitchell
e805426203
Support changing digest algorithm
...
This adds validation and the ability to modify the digest.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-07-07 11:44:40 -04:00
Brandon Mitchell
16a9d83434
Remove rwfs internal package
...
This was used for test implementations that were better handled with t.TempDir or olareg backed by memory.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-06-26 17:21:24 -04:00
Brandon Mitchell
5e05f50a3c
Refactor pulling a platform specific manifest
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-06-23 10:23:53 -04:00
Brandon Mitchell
11f112c3bb
Add an experimental regctl ref command
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-06-19 11:14:12 -04:00
Brandon Mitchell
0c843dfc25
Feat: Return non-zero on a failed registry ping
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-05-26 11:09:32 -04:00
Brandon Mitchell
de0489f4d3
Feat: regctl image mod add layer from directory
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-05-12 15:20:40 -04:00
Brandon Mitchell
0125c58e9f
Fix: Handle nil pointer when config file is a dir
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-05-11 15:09:31 -04:00
Brandon Mitchell
814278ce63
feat: image mod ability to add layers
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-05-09 16:19:46 -04:00
Brandon Mitchell
df25f07087
chore: Fix typo asci to ascii
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-05-07 15:39:35 -04:00
Brandon Mitchell
52b369010d
feat: Add regctl image create command
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-05-07 15:28:24 -04:00
Brandon Mitchell
5417b713d0
Feat: Adding zstd support
...
Breaking: pkg/archive.Compress no longer decompresses the input.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-05-06 16:41:35 -04:00
Brandon Mitchell
a67ff344de
feat: image mod layer compression
...
Note that zstd support needs to be added which will change this and a lot of other code.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-05-01 16:50:53 -04:00
Brandon Mitchell
1877a64107
Document regctl manifest head --platform
...
The --platform option should be clear that it will trigger a GET request.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-04-11 16:50:42 -04:00
Brandon Mitchell
ce2de4f338
Validate media types in created artifacts
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-03-30 12:05:40 -04:00
Brandon Mitchell
415eaf4808
Add regclient.ImageConfig method
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-03-29 15:27:37 -04:00
Brandon Mitchell
cf6c678cf7
Chore: Cleanup unused params
...
This is now flagged by gopls, but not yet in staticcheck.
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-03-13 16:02:30 -04:00
Brandon Mitchell
3790fdeda9
Add image mod options to set entrypoint and cmd
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-03-10 16:17:13 -04:00
Brandon Mitchell
a9c2ce418b
Add image mod option to set config platform
...
Signed-off-by: Brandon Mitchell <git@bmitch.net>
2024-03-10 12:18:37 -04:00