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

Update containerd_insecure_registries to match containerd_registries #8340

Merged
merged 6 commits into from
Jan 5, 2022

Conversation

mircyb
Copy link
Contributor

@mircyb mircyb commented Dec 25, 2021

i think this commit code is not completed works

exam registry address : a.com:5000

insecure registry must be http://a.com:5000

but this code add insecure a.com:5000 (without http://)

If there is no http, containerd accesses with https even if insecure_skip_verify = true

solution is code edit

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
/kind feature
Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

[containerd] make containerd_insecure_registries into a dict similar to containerd_registries [⚠️ ADD NOTE `containerd_insecure_registries` needs to be updated or won't work anymore]

i think this commit code is not completed works

exam registry address : a.com:5000

insecure registry must be http://a.com:5000

but this code add insecure a.com:5000 (without http://)

If there is no http, containerd accesses with https even if insecure_skip_verify = true

solution is code edit
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 25, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @mircyb. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 25, 2021
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 25, 2021
@@ -56,7 +56,7 @@ oom_score = {{ containerd_oom_score }}
{% endfor %}
{% for addr in containerd_insecure_registries %}
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{ addr }}"]
endpoint = ["{{ ([ addr ] | flatten ) | join('","') }}"]
endpoint = ["http://{{ ([ addr ] | flatten ) | join('","') }}"]
Copy link
Member

Choose a reason for hiding this comment

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

what about https ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https registry setting here and work fine

{% for registry, addr in containerd_registries.items() %}
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{ registry }}"]
endpoint = ["{{ ([ addr ] | flatten ) | join('","') }}"]
{% endfor %}

If endpoint is no http it will always try with https

Copy link
Contributor

Choose a reason for hiding this comment

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

How about updating sample inventory instead by adding "http://"?
Current sample is

# containerd_insecure_registries:
#   - mirror.registry.io
#   - 172.19.16.11:5000

# containerd_registries:
#   "docker.io": "https://registry-1.docker.io"

As we see, the sample of containerd_registries contains "https://".
It would be consistent by adding "http://" to the sample of containerd_insecure_registries, I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you for your advice,

i fixed code and doc for consistent

Copy link
Contributor

@oomichi oomichi left a comment

Choose a reason for hiding this comment

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

/cc @oomichi

@@ -56,7 +56,7 @@ oom_score = {{ containerd_oom_score }}
{% endfor %}
{% for addr in containerd_insecure_registries %}
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."{{ addr }}"]
endpoint = ["{{ ([ addr ] | flatten ) | join('","') }}"]
endpoint = ["http://{{ ([ addr ] | flatten ) | join('","') }}"]
Copy link
Contributor

Choose a reason for hiding this comment

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

How about updating sample inventory instead by adding "http://"?
Current sample is

# containerd_insecure_registries:
#   - mirror.registry.io
#   - 172.19.16.11:5000

# containerd_registries:
#   "docker.io": "https://registry-1.docker.io"

As we see, the sample of containerd_registries contains "https://".
It would be consistent by adding "http://" to the sample of containerd_insecure_registries, I guess.

@k8s-ci-robot k8s-ci-robot requested a review from oomichi January 4, 2022 22:24
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 5, 2022
@oomichi
Copy link
Contributor

oomichi commented Jan 5, 2022

Thanks for updating.
This changes how to specify containerd_insecure_registries for users.
Then please update Does this PR introduce a user-facing change?: on this pull request message instead of NONE.

@oomichi
Copy link
Contributor

oomichi commented Jan 5, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 5, 2022
@cristicalin
Copy link
Contributor

containerd Insecure registry config modify

I would reword this as:

[containerd] make containerd_insecure_registries into a dict similar to containerd_registries

This conveys more clearly the fact that a public facing configuration variable has changed format.

@mircyb mircyb closed this Jan 5, 2022
@mircyb
Copy link
Contributor Author

mircyb commented Jan 5, 2022

containerd Insecure registry config modify

I would reword this as:

[containerd] make containerd_insecure_registries into a dict similar to containerd_registries

This conveys more clearly the fact that a public facing configuration variable has changed format.

thx

@mircyb mircyb reopened this Jan 5, 2022
@cristicalin
Copy link
Contributor

@mircyb 👍

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 5, 2022
@floryut floryut removed the kind/feature Categorizes issue or PR as related to a new feature. label Jan 5, 2022
@floryut floryut added the kind/container-managers Containers section in the release note label Jan 5, 2022
Copy link
Member

@floryut floryut left a comment

Choose a reason for hiding this comment

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

@mircyb nice work 👍

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floryut, mircyb

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 5, 2022
@k8s-ci-robot k8s-ci-robot merged commit dda557e into kubernetes-sigs:master Jan 5, 2022
@floryut floryut changed the title Update config.toml.j2 Update containerd_insecure_registries to match containerd_registries Jan 5, 2022
@tmurakam
Copy link
Contributor

I'd like to backport pull request to release-2.18 branch.
Without this, I can't access private http registry from containerd.

tmurakam added a commit to tmurakam/kubespray that referenced this pull request Mar 4, 2022
tmurakam added a commit to tmurakam/kubespray that referenced this pull request Mar 4, 2022
tmurakam pushed a commit to tmurakam/kubespray that referenced this pull request Mar 6, 2022
* Update config.toml.j2

i think this commit code is not completed works

exam registry address : a.com:5000

insecure registry must be http://a.com:5000

but this code add insecure a.com:5000 (without http://)

If there is no http, containerd accesses with https even if insecure_skip_verify = true

solution is code edit

* Update config.toml.j2

* Update containerd.yml

* Update containerd.yml

* Update containerd.yml

* Update config.toml.j2

(cherry picked from commit dda557e)
tmurakam pushed a commit to tmurakam/kubespray that referenced this pull request Mar 8, 2022
* Update config.toml.j2

i think this commit code is not completed works

exam registry address : a.com:5000

insecure registry must be http://a.com:5000

but this code add insecure a.com:5000 (without http://)

If there is no http, containerd accesses with https even if insecure_skip_verify = true

solution is code edit

* Update config.toml.j2

* Update containerd.yml

* Update containerd.yml

* Update containerd.yml

* Update config.toml.j2

(cherry picked from commit dda557e)
k8s-ci-robot pushed a commit that referenced this pull request Mar 9, 2022
* Update config.toml.j2

i think this commit code is not completed works

exam registry address : a.com:5000

insecure registry must be http://a.com:5000

but this code add insecure a.com:5000 (without http://)

If there is no http, containerd accesses with https even if insecure_skip_verify = true

solution is code edit

* Update config.toml.j2

* Update containerd.yml

* Update containerd.yml

* Update containerd.yml

* Update config.toml.j2

(cherry picked from commit dda557e)

Co-authored-by: Choi Yongbeom <59861163+mircyb@users.noreply.github.com>
sakuraiyuta pushed a commit to sakuraiyuta/kubespray that referenced this pull request Apr 16, 2022
* Update config.toml.j2

i think this commit code is not completed works

exam registry address : a.com:5000

insecure registry must be http://a.com:5000

but this code add insecure a.com:5000 (without http://)

If there is no http, containerd accesses with https even if insecure_skip_verify = true

solution is code edit

* Update config.toml.j2

* Update containerd.yml

* Update containerd.yml

* Update containerd.yml

* Update config.toml.j2
@oomichi oomichi mentioned this pull request May 28, 2022
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jun 29, 2023
* Update config.toml.j2

i think this commit code is not completed works

exam registry address : a.com:5000

insecure registry must be http://a.com:5000

but this code add insecure a.com:5000 (without http://)

If there is no http, containerd accesses with https even if insecure_skip_verify = true

solution is code edit

* Update config.toml.j2

* Update containerd.yml

* Update containerd.yml

* Update containerd.yml

* Update config.toml.j2
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Oct 20, 2023
* Update config.toml.j2

i think this commit code is not completed works

exam registry address : a.com:5000

insecure registry must be http://a.com:5000

but this code add insecure a.com:5000 (without http://)

If there is no http, containerd accesses with https even if insecure_skip_verify = true

solution is code edit

* Update config.toml.j2

* Update containerd.yml

* Update containerd.yml

* Update containerd.yml

* Update config.toml.j2
sw-cho pushed a commit to sw-cho/kubespray that referenced this pull request Feb 5, 2024
* Update config.toml.j2

i think this commit code is not completed works

exam registry address : a.com:5000

insecure registry must be http://a.com:5000

but this code add insecure a.com:5000 (without http://)

If there is no http, containerd accesses with https even if insecure_skip_verify = true

solution is code edit

* Update config.toml.j2

* Update containerd.yml

* Update containerd.yml

* Update containerd.yml

* Update config.toml.j2
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. kind/container-managers Containers section in the release note lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants