Commit Graph

174 Commits (revert-14780-docker-cni)

Author SHA1 Message Date
Steven Powell 5dd0f26cd7 cleanup: Check for scanner errors 2023-03-31 11:15:34 -07:00
Steven Powell 99b4e45b1e
Revert "Special case port mapping publish on macOS" 2023-01-23 13:19:49 -08:00
Rahil Patel d7baa13960
fix spelling and grammar in Go files 2022-11-03 18:31:44 -04: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
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
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
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
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
Medya Gh c24818d9b7 lint 2022-02-01 13:21:53 -08:00
Medya Gh 8c6f9f64c7 lint 2022-01-31 15:18:04 -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
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
hetong07 9a30756d38 Improve the error message of setting cgroup memory limit. 2021-02-22 20:18:22 -08:00
hetong07 556a8d7930 Move the user facing warning inside hasMemoryCgroup(). 2021-02-18 16:43:19 -08:00
hetong07 e8c2a23398 Provide an advice for users on how to modify Grub setting. 2021-02-18 16:09:51 -08:00
hetong07 7b0bf57f4c Stop using --memory for cgroup v2. 2021-02-18 15:43:26 -08:00
Medya Ghazizadeh 369f93f393
Merge pull request #10468 from afbjorklund/cgroups-warning
Make sure to show debian warning also for cgroup 2
2021-02-18 14:25:59 -08:00
Medya Ghazizadeh 75be14d2ce
Merge pull request #10507 from afbjorklund/docker-memswap
Stop using --memory-swap if it is not available
2021-02-18 11:15:32 -08:00
Anders F Björklund eabc02d3c4 Stop using --memory-swap if it is not available
With Debian and Ubuntu kernels, it needs to be configured.

And now with cgroups v2, it starts throwing errors at run.
2021-02-18 18:54:36 +01:00
Kent Iso e3cd93aa1a Change prepareVolume func to add container name for preload side car 2021-02-17 10:06:12 +09:00
Anders F Björklund 2c87f6e1ad Make sure to show debian warning also for cgroup 2
Move check to function, to cut down on complexity
2021-02-13 18:37:54 +01:00
Priya Wadhwa a6372b35a3 Add 5 minute timeout to deleting leftover cvolumes and containers 2021-02-08 15:15:08 -08:00
Medya Ghazizadeh 6eadee30b8
Merge pull request #9802 from afbjorklund/podman-host-cleanup
Some more cleanup of missing code for podman-env
2020-12-09 15:00:37 -08:00
Anders F Björklund da778ea870 Some more cleanup of missing code for podman-env
There is a lot of code duplication from docker-env

Most of it also applies for podman (CONTAINER_HOST)
2020-11-29 23:35:37 +01:00
Anders F Björklund fee0f5310a Add private network implementation for podman
Most of it the same as docker, except for the options.

i.e. libnetwork "bridge" plugin vs. cni "bridge" plugin
2020-11-22 13:58:12 +01:00
Ilya Zuyev c97cd912f1 Rename oci.RuntimeHost() -> oci.DaemonHost() 2020-10-30 13:44:34 -07:00
Ilya Zuyev acbdafa4e1 Fix func naming 2020-10-27 16:07:50 -07:00
Ilya Zuyev 6e02753204 Forward ports for docker machine on Linux 2020-10-22 22:41:58 -07:00
Ilya Zuyev 89bf9ac01c Update certs and API endpoints 2020-10-22 22:10:07 -07:00
Ilya Zuyev eaa9ecfd31 Experiments 2020-10-22 13:41:01 -07:00
Ilya Zuyev 85d45be207 Fix docker-env command 2020-10-20 23:10:08 -07:00
Ilya Zuyev d384343c39 When configuring docker environment, use MINIKUBE_EXISTING_* variables if set 2020-10-19 22:02:42 -07:00
Nick Kubala fd15e50dbe
Fix typo (cointainer -> container) 2020-10-13 14:20:35 -07:00
Priya Modali 43cc1a2581 Resolved merg conflicts. 2020-10-02 14:10:55 -07:00
Priya Modali 97d96bf925 Switching from glob library to klog library. 2020-09-29 15:49:41 -07:00
Medya Gh f0f10d6135 first version 2020-09-29 14:14:24 -07:00
Sharif Elgamal b98580c820 fix up if statement 2020-09-17 10:31:10 -07:00
Sharif Elgamal eab92dc455 Reduce cyclotomic complexity of CreateContainerNode to fix lint 2020-09-17 10:22:28 -07:00
Anders F Björklund f718e39ab9 Make sure CFS_BANDWIDTH is available for --cpus 2020-09-15 12:54:39 +02:00
Sharif Elgamal 3c86db01f4
Merge pull request #9166 from priyawadhwa/revert-static-ip
Revert static IP for docker
2020-09-02 15:49:40 -07:00
Priya Wadhwa 22b40e215a revert static IP 2020-09-02 16:33:38 -04:00
Thomas Stromberg 7fc0299c6f Disable swap in Docker/podman by setting --memory-swap to --memory 2020-09-01 13:57:52 -07:00
Priya Wadhwa 2400d1b850 remove network correctly 2020-08-12 10:08:46 -07:00