Skip to content

Commit

Permalink
Change the cri-o socket location to upstream default
Browse files Browse the repository at this point in the history
Right now the cri-o socket is placed in `/var/run/crio.sock`, this
commit changes it to `/var/run/crio/crio.sock` which is similar to
upstream.

Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com>
  • Loading branch information
surajssd committed Dec 16, 2017
1 parent 8ca92d4 commit 74fcf32
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions cmd/localkube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ func SetupServer(s *localkube.LocalkubeServer) {
if s.ContainerRuntime == "remote" && s.RemoteRuntimeEndpoint == "" {
panic("Failed to connect to --container-runtime='remote' with no --container-runtime-endpoint")
}
// localkube flags can handle `--container-runtime=remote --remote-runtime-endpoint=/var/run/crio.sock --remote-image-endpoint=/var/run/crio.sock`,
// localkube flags can handle `--container-runtime=remote --remote-runtime-endpoint=/var/run/crio/crio.sock --remote-image-endpoint=/var/run/crio/crio.sock`,
// but this allows for a convenience of just e.g.`--container-runtime=crio` and the same for minikube
switch s.ContainerRuntime {
case "crio", "cri-o":
s.ContainerRuntime = "remote"
s.RemoteRuntimeEndpoint = "unix:///var/run/crio.sock"
s.RemoteImageEndpoint = "unix:///var/run/crio.sock"
s.RemoteRuntimeEndpoint = "unix:///var/run/crio/crio.sock"
s.RemoteImageEndpoint = "unix:///var/run/crio/crio.sock"
}

if s.ShouldGenerateCerts {
Expand Down
2 changes: 1 addition & 1 deletion deploy/iso/minikube-iso/package/crio-bin/crio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ storage_option = [
[crio.api]

# listen is the path to the AF_LOCAL socket on which crio will listen.
listen = "/var/run/crio.sock"
listen = "/var/run/crio/crio.sock"

# stream_address is the IP address on which the stream server will listen
stream_address = ""
Expand Down
4 changes: 2 additions & 2 deletions docs/alternative_runtimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Or you can use the extended version:
$ minikube start \
--network-plugin=cni \
--extra-config=kubelet.container-runtime=remote \
--extra-config=kubelet.container-runtime-endpoint=/var/run/crio.sock \
--extra-config=kubelet.image-service-endpoint=/var/run/crio.sock \
--extra-config=kubelet.container-runtime-endpoint=/var/run/crio/crio.sock \
--extra-config=kubelet.image-service-endpoint=/var/run/crio/crio.sock \
--bootstrapper=kubeadm
```
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ func SetContainerRuntime(cfg map[string]string, runtime string) map[string]strin
switch runtime {
case "crio", "cri-o":
cfg["container-runtime"] = "remote"
cfg["container-runtime-endpoint"] = "/var/run/crio.sock"
cfg["image-service-endpoint"] = "/var/run/crio.sock"
cfg["container-runtime-endpoint"] = "/var/run/crio/crio.sock"
cfg["image-service-endpoint"] = "/var/run/crio/crio.sock"
cfg["runtime-request-timeout"] = "15m"
default:
cfg["container-runtime"] = runtime
Expand Down

0 comments on commit 74fcf32

Please sign in to comment.