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

Rename cri sock #1175

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config/master/aws-k8s-cni-cn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@
"name": "log-dir"
- "mountPath": "/var/run/aws-node"
"name": "run-dir"
- "mountPath": "/var/run/dockershim.sock"
"name": "dockershim"
- "mountPath": "/var/run/cri.sock"
"name": "cri-sock"
- "mountPath": "/run/xtables.lock"
"name": "xtables-lock"
"hostNetwork": true
Expand Down Expand Up @@ -218,7 +218,7 @@
"name": "cni-net-dir"
- "hostPath":
"path": "/var/run/dockershim.sock"
"name": "dockershim"
"name": "cri-sock"
- "hostPath":
"path": "/run/xtables.lock"
"name": "xtables-lock"
Expand Down
6 changes: 3 additions & 3 deletions config/master/aws-k8s-cni-us-gov-east-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@
"name": "log-dir"
- "mountPath": "/var/run/aws-node"
"name": "run-dir"
- "mountPath": "/var/run/dockershim.sock"
"name": "dockershim"
- "mountPath": "/var/run/cri.sock"
"name": "cri-sock"
- "mountPath": "/run/xtables.lock"
"name": "xtables-lock"
"hostNetwork": true
Expand Down Expand Up @@ -218,7 +218,7 @@
"name": "cni-net-dir"
- "hostPath":
"path": "/var/run/dockershim.sock"
"name": "dockershim"
"name": "cri-sock"
- "hostPath":
"path": "/run/xtables.lock"
"name": "xtables-lock"
Expand Down
6 changes: 3 additions & 3 deletions config/master/aws-k8s-cni-us-gov-west-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@
"name": "log-dir"
- "mountPath": "/var/run/aws-node"
"name": "run-dir"
- "mountPath": "/var/run/dockershim.sock"
"name": "dockershim"
- "mountPath": "/var/run/cri.sock"
"name": "cri-sock"
- "mountPath": "/run/xtables.lock"
"name": "xtables-lock"
"hostNetwork": true
Expand Down Expand Up @@ -218,7 +218,7 @@
"name": "cni-net-dir"
- "hostPath":
"path": "/var/run/dockershim.sock"
"name": "dockershim"
"name": "cri-sock"
- "hostPath":
"path": "/run/xtables.lock"
"name": "xtables-lock"
Expand Down
6 changes: 3 additions & 3 deletions config/master/aws-k8s-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@
"name": "log-dir"
- "mountPath": "/var/run/aws-node"
"name": "run-dir"
- "mountPath": "/var/run/dockershim.sock"
"name": "dockershim"
- "mountPath": "/var/run/cri.sock"
"name": "cri-sock"
- "mountPath": "/run/xtables.lock"
"name": "xtables-lock"
"hostNetwork": true
Expand Down Expand Up @@ -218,7 +218,7 @@
"name": "cni-net-dir"
- "hostPath":
"path": "/var/run/dockershim.sock"
"name": "dockershim"
"name": "cri-sock"
- "hostPath":
"path": "/run/xtables.lock"
"name": "xtables-lock"
Expand Down
4 changes: 2 additions & 2 deletions config/master/manifests.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ local awsnode = {
{mountPath: "/host/etc/cni/net.d", name: "cni-net-dir"},
{mountPath: "/host/var/log/aws-routed-eni", name: "log-dir"},
{mountPath: "/var/run/aws-node", name: "run-dir"},
{mountPath: "/var/run/dockershim.sock", name: "dockershim"},
{mountPath: "/var/run/cri.sock", name: "cri-sock"},
{mountPath: "/run/xtables.lock", name: "xtables-lock"},
],
},
Expand All @@ -206,7 +206,7 @@ local awsnode = {
volumes: [
{name: "cni-bin-dir", hostPath: {path: "/opt/cni/bin"}},
{name: "cni-net-dir", hostPath: {path: "/etc/cni/net.d"}},
{name: "dockershim", hostPath: {path: "/var/run/dockershim.sock"}},
{name: "cri-sock", hostPath: {path: "/var/run/dockershim.sock"}},
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just keep it as dockershim and update the readme with clear comments or have another sample config with cri sock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The point here is that it's not docker specific, it's "any CRI socket" that we mount inside the pod. That's why we want to rename it.

Copy link

Choose a reason for hiding this comment

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

Considering that Kubernetes is deprecating Docker, should this be merged? Would make make it easier to understand what changes are require for compatibility with containerd or cri-o.

It may be a good idea to also remove mentions to dockerSocketPath at same time:

socketPath := dockerSocketPath
if info, err := os.Stat("/var/run/cri.sock"); err == nil && !info.IsDir() {
socketPath = criSocketPath
}

{name: "xtables-lock", hostPath: {path: "/run/xtables.lock"}},
{name: "log-dir",
hostPath: {
Expand Down