Skip to content

Commit

Permalink
Test #182 with Minikube 1.25 (#183)
Browse files Browse the repository at this point in the history
* Fixes containerd cri mirror updates

- Updates the sed command that modifies the containerd config.toml file
  to be able to edit the mirror configurations as they are different
  between minikube v1.24.0 and v1.25.0. The v1.24.0 follows the form
  '[plugins.cri.registry.mirrors]' and v1.25.0 follows the form
  '[plugins."io.containerd.grpc.v1.cri".registry.mirrors]'.

* Bump minikube version for testing

Co-authored-by: Andrew Hamilton <[email protected]>
  • Loading branch information
nicksieger and ahamilton55 authored Jan 24, 2022
1 parent d8fd5f5 commit fc22904
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
sudo apt upgrade -y containerd.io
- run: |
set -ex
export MINIKUBE_VERSION=v1.23.2
export MINIKUBE_VERSION=v1.25.0
curl -fLo ./minikube-linux-amd64 "https://github.com/kubernetes/minikube/releases/download/${MINIKUBE_VERSION}/minikube-linux-amd64"
chmod +x ./minikube-linux-amd64
sudo mv ./minikube-linux-amd64 /usr/local/bin/minikube
Expand Down
6 changes: 3 additions & 3 deletions pkg/cluster/admin_minikube.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ func (a *minikubeAdmin) applyContainerdPatch(ctx context.Context, desired *api.C
cmd := exec.CommandContext(ctx, "minikube", "-p", desired.Name, "--node", node,
"ssh", "sudo", "sed", `\-i`,
fmt.Sprintf(
`s,\\\[plugins.cri.registry.mirrors\\\],[plugins.cri.registry.mirrors]\\\n`+
`\ \ \ \ \ \ \ \ [plugins.cri.registry.mirrors.\\\"localhost:%d\\\"]\\\n`+
`s,\\\[plugins.\\\(\\\"\\\?.*cri\\\"\\\?\\\).registry.mirrors\\\],[plugins.\\\1.registry.mirrors]\\\n`+
`\ \ \ \ \ \ \ \ [plugins.\\\1.registry.mirrors.\\\"localhost:%d\\\"]\\\n`+
`\ \ \ \ \ \ \ \ \ \ endpoint\ =\ [\\\"http://%s:%d\\\"]\\\n`+
`\ \ \ \ \ \ \ \ [plugins.cri.registry.mirrors.\\\"%s:%d\\\"]\\\n`+
`\ \ \ \ \ \ \ \ [plugins.\\\1.registry.mirrors.\\\"%s:%d\\\"]\\\n`+
`\ \ \ \ \ \ \ \ \ \ endpoint\ =\ [\\\"http://%s:%d\\\"],`,
registry.Status.HostPort, networkHost, registry.Status.ContainerPort,
networkHost, registry.Status.ContainerPort,
Expand Down

0 comments on commit fc22904

Please sign in to comment.