Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Add unix:// prefix for socket addresses used by CRI remote client. #748

Merged
merged 1 commit into from
Apr 23, 2018
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ sudo containerd
```
2. From the Kubernetes project directory startup a local cluster using `containerd`:
```bash
CONTAINER_RUNTIME=remote CONTAINER_RUNTIME_ENDPOINT='/run/containerd/containerd.sock' ./hack/local-up-cluster.sh
CONTAINER_RUNTIME=remote CONTAINER_RUNTIME_ENDPOINT='unix:///run/containerd/containerd.sock' ./hack/local-up-cluster.sh
```
### Test
See [here](./docs/testing.md) for information about test.
Expand Down
2 changes: 1 addition & 1 deletion cluster/gce/env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
export KUBE_MASTER_EXTRA_METADATA="user-data=${GCE_DIR}/cloud-init/master.yaml,containerd-configure-sh=${GCE_DIR}/configure.sh,containerd-env=${version_file}"
export KUBE_NODE_EXTRA_METADATA="user-data=${GCE_DIR}/cloud-init/node.yaml,containerd-configure-sh=${GCE_DIR}/configure.sh,containerd-env=${version_file}"
export KUBE_CONTAINER_RUNTIME="remote"
export KUBE_CONTAINER_RUNTIME_ENDPOINT="/run/containerd/containerd.sock"
export KUBE_CONTAINER_RUNTIME_ENDPOINT="unix:///run/containerd/containerd.sock"
export KUBE_CONTAINER_RUNTIME_NAME=containerd
export KUBE_LOAD_IMAGE_COMMAND="/home/containerd/usr/local/bin/ctr cri load"
export NETWORK_PROVIDER=""
Expand Down
4 changes: 2 additions & 2 deletions contrib/ansible/cri-containerd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
- name: "Add runtime args in kubelet conf"
lineinfile:
dest: "/etc/systemd/system/kubelet.service.d/10-kubeadm.conf"
line: "Environment=\"KUBELET_EXTRA_ARGS= --runtime-cgroups=/system.slice/containerd.service --container-runtime=remote --runtime-request-timeout=15m --container-runtime-endpoint=/run/containerd/containerd.sock\""
line: "Environment=\"KUBELET_EXTRA_ARGS= --runtime-cgroups=/system.slice/containerd.service --container-runtime=remote --runtime-request-timeout=15m --container-runtime-endpoint=unix:///run/containerd/containerd.sock\""
insertafter: '\[Service\]'
when: check_args.stdout == ""

Expand All @@ -57,5 +57,5 @@
- name: "Pre-pull pause container image"
shell: |
/usr/local/bin/ctr pull k8s.gcr.io/pause:3.1
/usr/local/bin/crictl --runtime-endpoint /run/containerd/containerd.sock \
/usr/local/bin/crictl --runtime-endpoint unix:///run/containerd/containerd.sock \
pull k8s.gcr.io/pause:3.1
6 changes: 3 additions & 3 deletions docs/crictl.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ so you don't have to repeatedly specify the runtime sock used to connect crictl
to the container runtime:
```console
$ cat /etc/crictl.yaml
runtime-endpoint: /run/containerd/containerd.sock
image-endpoint: /run/containerd/containerd.sock
runtime-endpoint: unix:///run/containerd/containerd.sock
image-endpoint: unix:///run/containerd/containerd.sock
timeout: 10
debug: true
```
Expand Down Expand Up @@ -188,7 +188,7 @@ $ crictl info
"sandboxImage": "k8s.gcr.io/pause:3.1",
"statsCollectPeriod": 10,
"containerdRootDir": "/var/lib/containerd",
"containerdEndpoint": "/run/containerd/containerd.sock",
"containerdEndpoint": "unix:///run/containerd/containerd.sock",
"rootDir": "/var/lib/containerd/io.containerd.grpc.v1.cri",
"stateDir": "/run/containerd/io.containerd.grpc.v1.cri",
},
Expand Down
2 changes: 1 addition & 1 deletion hack/install/install-critools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ make
${SUDO} make install -e BINDIR=${CRITOOL_DIR} GOPATH=${GOPATH}
${SUDO} mkdir -p ${CRICTL_CONFIG_DIR}
${SUDO} bash -c 'cat >'${CRICTL_CONFIG_DIR}'/crictl.yaml <<EOF
runtime-endpoint: /run/containerd/containerd.sock
runtime-endpoint: unix:///run/containerd/containerd.sock
EOF'

# Clean the tmp GOPATH dir.
Expand Down
2 changes: 1 addition & 1 deletion hack/test-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ -f "${CONTAINERD_CONFIG_FILE}" ]; then
CONTAINERD_FLAGS+="--config ${CONTAINERD_CONFIG_FILE} "
fi

CONTAINERD_SOCK=/run/containerd/containerd.sock
CONTAINERD_SOCK=unix:///run/containerd/containerd.sock

containerd_pid=

Expand Down
2 changes: 1 addition & 1 deletion hack/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..

# Not from vendor.conf.
CRITOOL_VERSION=db53d78569a8116fff1f60366a8de3130e767eeb
CRITOOL_VERSION=f37a5a1edb69ee742c6e42c57413fe6b63788085
CRITOOL_PKG=github.com/kubernetes-incubator/cri-tools
CRITOOL_REPO=github.com/kubernetes-incubator/cri-tools

Expand Down
2 changes: 1 addition & 1 deletion integration/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var (
criPluginClient api.CRIPluginServiceClient
)

var criEndpoint = flag.String("cri-endpoint", "/run/containerd/containerd.sock", "The endpoint of cri plugin.")
var criEndpoint = flag.String("cri-endpoint", "unix:///run/containerd/containerd.sock", "The endpoint of cri plugin.")
var criRoot = flag.String("cri-root", "/var/lib/containerd/io.containerd.grpc.v1.cri", "The root directory of cri plugin.")

func init() {
Expand Down