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 support for containerd cri registry config_path #8973

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

brandond
Copy link
Member

@brandond brandond commented Nov 30, 2023

Proposed Changes

Add support for containerd cri registry config_path

Render cri registry mirrors.x.endpoints and configs.x.tls into config_path; keep
using mirrors.x.rewrites and configs.x.auth those do not yet have an
equivalent in the new format.

The new config file format allows disabling containerd's fallback to the
default endpoint when using mirror endpoints; a new CLI flag is added to
control that behavior.

This also re-shares some code that was unnecessarily split into parallel
implementations for linux/windows versions. There is probably more work
to be done on this front but it's a good start.

Types of Changes

deprecated functionality

Verification

Confirm that registry mirrors, auth, and tls still work

Testing

Linked Issues

User-Facing Change


Further Comments

@brandond brandond requested a review from a team as a code owner November 30, 2023 05:24
@brandond brandond force-pushed the containerd_registry_config_path branch from 2d2542a to 0111fee Compare November 30, 2023 09:48
@brandond brandond marked this pull request as draft November 30, 2023 09:53
@brandond brandond force-pushed the containerd_registry_config_path branch from 0111fee to fe17b70 Compare November 30, 2023 21:01
@brandond brandond marked this pull request as ready for review November 30, 2023 21:02
@brandond brandond force-pushed the containerd_registry_config_path branch 2 times, most recently from c2c648b to 78975ca Compare November 30, 2023 21:59
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 75 lines in your changes are missing coverage. Please review.

Comparison is base (08ccea5) 41.56% compared to head (f4f7850) 41.43%.
Report is 1 commits behind head on master.

Files Patch % Lines
pkg/agent/containerd/config.go 18.66% 54 Missing and 7 partials ⚠️
pkg/agent/templates/templates.go 33.33% 9 Missing and 1 partial ⚠️
pkg/agent/templates/templates_linux.go 0.00% 3 Missing ⚠️
pkg/agent/containerd/config_linux.go 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8973      +/-   ##
==========================================
- Coverage   41.56%   41.43%   -0.13%     
==========================================
  Files         148      150       +2     
  Lines       15946    16024      +78     
==========================================
+ Hits         6628     6640      +12     
- Misses       8189     8250      +61     
- Partials     1129     1134       +5     
Flag Coverage Δ
inttests 38.67% <24.24%> (-0.12%) ⬇️
unittests 18.19% <0.00%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brandond brandond force-pushed the containerd_registry_config_path branch from 78975ca to 7645c87 Compare December 8, 2023 23:03
@brandond brandond force-pushed the containerd_registry_config_path branch from 7645c87 to fb0dde0 Compare December 23, 2023 00:48
@brandond brandond force-pushed the containerd_registry_config_path branch from fb0dde0 to a9d664b Compare January 4, 2024 00:09
Render cri registry mirrors.x.endpoints and configs.x.tls into config_path; keep
using mirrors.x.rewrites and configs.x.auth those do not yet have an
equivalent in the new format.

The new config file format allows disabling containerd's fallback to the
default endpoint when using mirror endpoints; a new CLI flag is added to
control that behavior.

This also re-shares some code that was unnecessarily split into parallel
implementations for linux/windows versions. There is probably more work
to be done on this front but it's a good start.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond force-pushed the containerd_registry_config_path branch from a9d664b to f4f7850 Compare January 4, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants