-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[containerd] add config support override_path
#10776
[containerd] add config support override_path
#10776
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yankay 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 |
{% if mirror.override_path is defined %} | ||
override_path = {{ mirror.override_path | default('false') | string | lower }} | ||
{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd drop the if.
{% if mirror.override_path is defined %} | |
override_path = {{ mirror.override_path | default('false') | string | lower }} | |
{% endif %} | |
override_path = {{ mirror.override_path | default('false') | string | lower }} |
false is containerd default, so that's consistent.
(In fact I'd drop the if on skip_verify as well ^)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @VannTen
After thinking about the idea twice, there is a problem.
If "the if
be dropped", every host.toml
file will contain
skip_verify = false
override_path = false
although the skip_verify
and override_path
is not defined.
It's not necessary, and it makes the config file simpler.
So, I think the original PR is reasonable, and it keeps the same with skip_verify
, making the code easier to read.
How about you think about that :-)
After thinking about the idea twice, there is a problem.
If "the `if` be dropped", every `host.toml` file will contain
```
skip_verify = false
override_path = false
```
although the `skip_verify` and `override_path` is not defined.
Yeah, but those are false by default.
It's not necessary, and it makes the config file simpler.
Making the resulting config file simpler does not really buy anything, you could even argue that's having explicit settings is self-documenting.
OTOH, making the **template** simpler help for future modifications and debugging.
|
df95f42
to
fd6f63b
Compare
Thanks for suggestion :-) 🤝🤝🤝 Got it. The code has been changed. |
Might want to rebase to get the vagrant fix 👍 |
fd6f63b
to
975cbc3
Compare
/lgtm |
What type of PR is this?
What this PR does / why we need it:
override_path
is the config of contained, ref : https://github.com/containerd/containerd/blob/main/docs/hosts.md#override_path-fieldIt's useful to configure registry mirrors , ref https://microk8s.io/docs/registry-private#configure-registry-mirrors-7
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: