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

capi: make containerd CRI socket configurable #433

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

dongsupark
Copy link
Member

We should be able to configure path to containerd CRI socket file, containerd_cri_socket, for each distro.
Its main use case is to support distros with different CRI socket path, for example, /run/docker/libcontainerd/container.sock for Flatcar.
By default it is /var/run/containerd/containerd.sock as it has been in all other distros.

This PR is split out from #248, as suggested by @codenrhoden.

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 18, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @dongsupark. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 18, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Nov 18, 2020
@dongsupark
Copy link
Member Author

/assign @ncdc

Copy link
Contributor

@codenrhoden codenrhoden left a comment

Choose a reason for hiding this comment

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

/ok-to-test

Thanks for breaking this out, @dongsupark.

I have one request. Rather than putting containerd_cri_socket into every other OS, let's instead put it in config/containerd.json. Since the existing value of /var/run/containerd/containerd.sock is indeed a default for all current OS's, there's no need to define it each place.

looking forward to flatcar support, you can then override this value in only your flatcar.json file. The makefile ensures that the OS-specific JSON file is loaded after all the "defaults" that are in the config folder, which for Packer means the OS-specific JSON files take precedence.

/assign @moshloop
^ Moshe, I know you wanted to see this happen separately as well.

@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 Nov 18, 2020
@dongsupark
Copy link
Member Author

@codenrhoden Done.
Now containerd_cri_socket is defined only in packer/config/containerd.json.

@ncdc
Copy link
Contributor

ncdc commented Nov 19, 2020

@fabriziopandini this is probably worth your 👀 too - thanks

@codenrhoden
Copy link
Contributor

/lgtm

Will wait for others to chime in.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 19, 2020
@@ -0,0 +1 @@
runtime-endpoint: unix://{{ containerd_cri_socket }}
Copy link
Member

Choose a reason for hiding this comment

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

Should there also be a related change to one of the task files in images/capi/ansible/roles/containerd/tasks to reference this file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should there also be a related change to one of the task files in images/capi/ansible/roles/containerd/tasks to reference this file?

Good catch. Thanks.
I forgot about moving the corresponding changes from #248, when splitting out the PR.
Updated this PR.

We should be able to configure path to containerd CRI socket file,
`containerd_cri_socket`, for each distro. Its main use case is to
support distros with different CRI socket path, for example,
`/run/docker/libcontainerd/container.sock` for Flatcar. By default it
is `/var/run/containerd/containerd.sock` as it has been in all other
distros.

This PR is split out from
kubernetes-sigs#248, as suggested
by codenrhoden.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 1, 2020
Copy link
Member

@detiber detiber left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 1, 2020
@codenrhoden
Copy link
Contributor

/approve

Thanks for the assist @detiber

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: codenrhoden, dongsupark

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 Dec 3, 2020
@k8s-ci-robot k8s-ci-robot merged commit 6dcd552 into kubernetes-sigs:master Dec 3, 2020
@dongsupark dongsupark deleted the dongsu/cri-socket branch December 3, 2020 16:27
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. 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.

6 participants