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

fix: change the position of the containerd_extra_args parameter to make the parameter more universal. #11013

Merged

Conversation

qcu266
Copy link
Contributor

@qcu266 qcu266 commented Mar 15, 2024

fix: change the position of the containerd_extra_args parameter to make the parameter more universal.

/kind bug

What this PR does / why we need it:

The template parameter containerd_extra_args is currently limited to the TOML global table, which is not versatile enough. It can be adjusted to be under the global table.

In my scenario, it can be configured as follows:

containerd_extra_args: |
  plugins."io.containerd.grpc.v1.cri".device_ownership_from_security_context = true

And this adjustment should not break compatibility.

Which issue(s) this PR fixes:

Fixes #11007

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Change the position of the containerd_extra_args parameter to enhance its universality.

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 15, 2024
Copy link

linux-foundation-easycla bot commented Mar 15, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: qcu266 / name: QCU (c63b207)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 15, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @qcu266!

It looks like this is your first PR to kubernetes-sigs/kubespray 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubespray has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@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 Mar 15, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @qcu266. 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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 15, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 15, 2024
@yankay
Copy link
Member

yankay commented Mar 15, 2024

/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 Mar 15, 2024
@yankay
Copy link
Member

yankay commented Mar 22, 2024

Thanks @qcu266

the good idea is awsome.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qcu266, 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 /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 Mar 22, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 23, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 24, 2024
@qcu266
Copy link
Contributor Author

qcu266 commented Apr 24, 2024

@yankay Is there any issue with this PR? Why not merge?

@VannTen
Copy link
Contributor

VannTen commented May 3, 2024

the template parameter containerd_extra_args is currently limited to the TOML global table, which is not versatile enough. It can be adjusted to be under the global table.

It's not entirely clear (to me, at least), what this means. Could you add a more thorough explanation or maybe a link explaining what the TOML global table is ?

Please also add a proper release note

@yankay Is there any issue with this PR? Why not merge?

Because reviewers and maintainers don't have infinite time 🤷

@qcu266
Copy link
Contributor Author

qcu266 commented May 6, 2024

@VannTen "global table" is mean that toml root level table

version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0

plugins."io.containerd.grpc.v1.cri".device_ownership_from_security_context = true

[grpc]
  max_recv_message_size = 16777216
  max_send_message_size = 16777216

[debug]
  level = "info"

[metrics]
  address = ""
  grpc_histogram = false

[plugins]
  [plugins."io.containerd.grpc.v1.cri"]
    sandbox_image = "k8s.gcr.io/pause:3.9"
    max_container_log_line_size = -1
    enable_unprivileged_ports = false
    enable_unprivileged_icmp = false
    [plugins."io.containerd.grpc.v1.cri".registry]
      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io"]

in this case, if plugins."io.containerd.grpc.v1.cri".device_ownership_from_security_context = true add to the end of file, it's mean
plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io".plugins."io.containerd.grpc.v1.cri".device_ownership_from_security_context = true

@VannTen
Copy link
Contributor

VannTen commented May 14, 2024

Ok that's clearer ! Could you add that explanation (that you can only place thing in the root table in a toml document before the first table heading) in your commit message ? It helps people not familiar enough with toml to understand why we're doing this.

(also, you'll need a release note)

@qcu266 qcu266 force-pushed the fix/containerd-extra-args branch from 54428bf to 105241a Compare May 15, 2024 01:02
…ke the parameter more universal.

that you can only place thing in the root table in a toml document before the first table heading.
@qcu266 qcu266 force-pushed the fix/containerd-extra-args branch from 105241a to c63b207 Compare May 15, 2024 01:07
@qcu266
Copy link
Contributor Author

qcu266 commented May 15, 2024

@VannTen Thank you for your review and suggestions, I have already made the adjustments.

@VannTen
Copy link
Contributor

VannTen commented May 16, 2024

/lgtm

Thanks.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 16, 2024
@k8s-ci-robot k8s-ci-robot merged commit d7756d8 into kubernetes-sigs:master May 16, 2024
60 checks passed
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/bug Categorizes issue or PR as related to a bug. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

containerd cannot add extra config for [plugins."io.containerd.grpc.v1.cri"]
4 participants