Commit Graph

406 Commits (revert-14780-docker-cni)

Author SHA1 Message Date
cui fliter 6f881a7ed6 fix function name in comment
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-06-28 11:59:22 +08:00
Steven Powell 5dd0f26cd7 cleanup: Check for scanner errors 2023-03-31 11:15:34 -07:00
Steven Powell 35b0b56e9e tests: fix unit test failing if docker not running 2023-03-20 16:59:47 -07:00
Medya Ghazizadeh d27a234f93
Merge pull request #15541 from spowelljr/updateDocker
ISO: Update docker, containerd, and cri-dockerd
2023-01-23 16:45:29 -08:00
Steven Powell 99b4e45b1e
Revert "Special case port mapping publish on macOS" 2023-01-23 13:19:49 -08:00
Steven Powell a3d4863cf4 update containerd to 1.6.15 and cri-dockerd to 0.3.0 2023-01-19 13:34:09 -08:00
Predrag Rogic 24226c5f5a
Merge branch 'master' into fix-TestNetworkPlugins-Linux_Docker 2023-01-10 22:44:50 +00:00
Predrag Rogic 6c98afcdbd
cleanup and containerd systemd cgroup issue workaround 2023-01-09 02:23:07 +00:00
Steven Powell e6d95b8230 implement --static-ip flag 2023-01-04 10:27:00 -08:00
Predrag Rogic bd7efa03f9
fix additional issues found 2022-12-07 12:34:31 +00:00
Eng Zer Jun 9d85be1a99
test: use `T.Setenv` to set env vars in tests
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-11-08 10:30:29 +08:00
Rahil Patel d7baa13960
fix spelling and grammar in Go files 2022-11-03 18:31:44 -04:00
Steven Powell 2f3fe5d258 use port forwarding on Linux with Docker Desktop 2022-10-12 15:05:00 -07:00
Steven Powell 744187868d fix linting 2022-08-08 09:29:19 -07:00
Kian-Meng Ang bc03821826 Fix typos 2022-06-10 15:26:35 -07:00
Steven Powell c099c054b2
Merge pull request #14290 from kgibm/issue12658
Special case port mapping publish on macOS
2022-06-08 11:09:20 -07:00
Steven Powell 2f3a8514ee
Merge pull request #12739 from alias-dev/master
Support starting minikube with the Podman driver on NixOS systems
2022-06-07 16:29:50 -07:00
Kevin Grigorenko 7df74d3e4a
Issue #12658: Special case port mapping publish on macOS
Signed-off-by: Kevin Grigorenko <kevin.grigorenko@us.ibm.com>
2022-06-07 09:24:21 -05:00
Pablo Caderno f6d639182d fix: minikube delete exclude networks from other profiles
Fixes: 12635
2022-06-06 16:59:41 +10:00
Alex Andrews 1d35e4fcf9 return default kernel modules path if alternatives are not found 2022-05-16 22:30:05 +01:00
Alex Andrews e5d8c9d8ef move checkRunning out of CreateContainerNode 2022-05-16 22:30:04 +01:00
Alex Andrews 8fb9165f82 fix NixOS kernel modules path in podman driver 2022-05-16 22:30:04 +01:00
Steven Powell 09365b4b04
Merge pull request #14175 from minikube-bot/auto_bump_golint_version
bump golint version
2022-05-16 13:21:06 -07:00
Steven Powell 288f5ef815 more lint fixes 2022-05-16 12:59:25 -07:00
Pablo Caderno cd4428dfdd fix: removed unused code
Signed-off-by: Pablo Caderno <kaderno@gmail.com>
2022-05-13 09:17:31 +10:00
Pablo Caderno f31a1d5020 fix: conditional compiling for cgroups code 2022-05-09 19:41:28 +10:00
Pablo Caderno 947ff0435b fix: small code refactor 2022-05-08 19:46:17 +10:00
Pablo Caderno 7d9eca5eff fix: improved memory cgroup checks
Signed-off-by: Pablo Caderno <kaderno@gmail.com>
2022-05-08 19:46:17 +10:00
Akihiro Suda 92ab555928
Support rootless Podman driver, take 2
Usage:
```
minikube config set rootless true
minikube start --driver=podman --container-runtime=(cri-o|containerd)`
```

Tested on Podman 4.0.2, Ubuntu 21.10.

Needs cgroup v2 (as in Rootless Docker): https://rootlesscontaine.rs/getting-started/common/cgroup2/
See also `site/content/en/docs/drivers/includes/podman_usage.inc`

Fix issue 8719
Fix issue 12460
Replace PR 12901

Changes from PR 12901: `rootless` is now a config property.
In the previous PR, `--rootless` was implemented as a flag for `minikube start`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-04-05 18:49:40 +09:00
Steven Powell ad4d80e955
Merge pull request #13881 from AkihiroSuda/fix-podman-v4-network-inspect
Podman: fix `minikube delete` for Podman v4
2022-03-31 14:15:06 -07:00
Steven Powell 1aa1f04e9b remove old build tags 2022-03-30 16:43:29 -07:00
Sharif Elgamal 31d1fdae3b
Merge pull request #13730 from presztak/subnet_flag
Add 'subnet' flag for docker/podman driver
2022-03-30 16:02:54 -07:00
Akihiro Suda 28fdc99086
Podman: fix `minikube delete` for Podman v4
The "minikube" network was not deleted due to the breaking change of
`podman network inspect` in Podman v4.

Fix issue 13861

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-03-30 18:29:14 +09:00
Akihiro Suda 7204b1db3e
KIC rootless: drop fuse-overlayfs; bump kernel requirement to 5.11
minikube 1.23 (PR 12359) added fuse-overlayfs snapshotter for rootless Docker driver,
but got broken in minikube 1.25 (issue 13534).

We can drop fuse-overlayfs for kernel >= 5.11.

Fix issue 13534

We may add back fuse-overlayfs later if there is a huge demand to
support kernel < 5.11.
That will require packing preloadable tarballs for fuse-overlayfs
snapshotter.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-03-22 18:08:14 +09:00
Piotr Resztak f3c9198134 add support for 'subnet' flag 2022-03-15 21:42:09 +01:00
Medya Gh c24818d9b7 lint 2022-02-01 13:21:53 -08:00
Medya Gh 8c6f9f64c7 lint 2022-01-31 15:18:04 -08:00
Steven Powell c5b1c56f57
Merge pull request #12835 from presztak/remove_kicbase_image_info
Print a message about preserving kicbase image when `minkube delete --purge --all` used
2022-01-27 21:23:27 -08:00
Steven Powell e43ead0043 add quote to Windows env 2021-12-16 10:02:59 -08:00
Steven Powell 5a66196a20 update message 2021-12-15 15:58:00 -08:00
Steven Powell b17834c96b added env to suppress Docker performance messages 2021-12-14 13:46:52 -08:00
Steven Powell 8d7a636bfe don't output Docker performance issues when user wants JSON 2021-12-09 14:38:18 -08:00
Piotr Resztak 7b3860388c Print a message about preserving kicbase image
Print additional info about preserving kicbase image and generates
image deletion command for user when running `minikube delete`.
Message is printed only when `--purge` option is used.
2021-11-25 23:36:59 +01:00
Steven Powell 016b3ac40a trim space earlier 2021-10-21 13:28:52 -07:00
Steven Powell fbd4d27582 fix podman network inspect index check 2021-10-21 10:01:10 -07:00
Anders F Björklund 75804c43ad Match the lower case of the podman error message
Turns out that Docker says "No such network",
but Podman says "no such network". Little nuances.
2021-10-10 12:25:18 +02:00
Steven Powell dafbe6aac3 add created by label for podman 2021-09-29 13:47:59 -07:00
Steven Powell 145f9fc9ab run `go fmt` 2021-09-13 11:58:43 -07:00
Akihiro Suda 323225483e
Support Rootless Docker
Requirements:
- Install rootless Docker 20.10 or later, see https://rootlesscontaine.rs/getting-started/docker/
- Enable cgroup v2 delegation, see https://rootlesscontaine.rs/getting-started/common/cgroup2/

Usage: `minikube start --driver=docker --container-runtime=containerd`.
The `--container-runtime` flag needs to be set to "containerd".
CRI-O can be also supported later.

Closes issue 10836 ("add support for rootless Docker").

Support for rootless Podman (issue 8719) is not covered in this commit.

---

Code reading guide:
- `deploy/kicbase/Dockerfile`: updated to install fuse-overlayfs and containerd-fuse-overlayfs, which is used
  instead of `overlayfs` snapshotter

- `deploy/kicbase/entrypoint`: updated to verify cgroup v2 delegation.
  Mostly from 8a83ee46b2/images/base/files/usr/local/bin/entrypoint

- `cmd/minikube/cmd/start_flags.go`: updated to set `KubeletInUserNamespace` feature gate when rootless

- `pkg/drivers/kic/oci`: updated to use port forwarding, because rootless container IPs are not reachable from the host

- `pkg/minikube/cruntime`: updated to generate `/etc/containerd/config.toml` with rootless support.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-27 17:21:53 +09:00
Medya Ghazizadeh 81c2bb2796
Merge pull request #11708 from afbjorklund/info-klog
Make sure to log errors from DaemonInfo
2021-07-07 13:29:05 -04:00