Commit Graph

8846 Commits (master)

Author SHA1 Message Date
Kaviraj Sankameeswaran a068e3b132 refactor: modernize slice operations using slices and maps packages
Replace traditional append-in-loop patterns with modern Go functions slices.Sorted(), slices.Collect(), and maps.Keys()/maps.Values()

Changes made (5 files):
- cmd/minikube/cmd/config/addons_list.go: Use slices.Sorted(maps.Keys())
- cmd/minikube/cmd/version.go: Use slices.Sorted(maps.Keys())
- hack/changelog/changelog.go: Use slices.Collect(maps.Keys())
- pkg/minikube/node/cache.go: Use slices.Collect(maps.Keys())
- pkg/minikube/registry/registry.go: Use slices.Collect(maps.Values())

Files skipped due to complexity:
- pkg/drivers/kic/oci/oci.go
- pkg/drivers/hyperkit/driver.go
- pkg/drivers/kvm/gpu.go
- pkg/drivers/kvm/numa.go [Unrelated slice optimization possible, can be addressed along with other similar code]
- pkg/minikube/tunnel/kic/*
- cmd/minikube/cmd/service.go
- hack/legacy_fill_db/filldb.go

These cases require more sophisticated transformation logic that might be better addressed in separate issue/PR
2025-08-28 11:29:39 -07:00
Predrag Rogic 81a9a111d2 skip tests not relevant for windows 2025-08-27 21:08:08 -07:00
Predrag Rogic a931f4e73e skip tests not relevant for windows 2025-08-27 21:08:08 -07:00
minikube-bot b0db07d450 bump default/newest kubernetes versions 2025-08-27 16:25:51 -07:00
minikube-bot 8fe6573293 update image constants for kubeadm images 2025-08-27 14:43:43 -07:00
minikube-bot 7f79a3ad71 Updating kicbase image to v0.0.47-1756116447-21413 2025-08-27 14:41:18 -07:00
minikube-bot d6fc793136 Addon kubevirt: Update bitnami/kubectl image from 1.33.3 to 1.33.4 2025-08-27 10:58:32 -07:00
minikube-bot 750a6134d2 CNI: Update calico from v3.30.2 to v3.30.3 2025-08-25 13:29:18 -07:00
minikube-bot 99f1e93b3b update Kubernetes versions list 2025-08-25 09:49:44 -07:00
Nir Soffer a8babb399c constants: Update kubeacm contants
Generated using:

    make update-kubeadm-constants
2025-08-22 14:27:03 -07:00
Nir Soffer b2e489570c constants: Remove k8s 1.33.* and 1.34.* versions
We want to rebuild the version to ensure we get correct versions.
2025-08-22 14:27:03 -07:00
Nir Soffer 96229adc41 drivers: Add Virtiofs mounts for vfkit and krunkit
Replace 9p mounts with virtiofs for vfkit and krunkit. Testing shows
that virtiofs mount is 23 times faster with krunkit, and 8 times faster
with vfkit.

vfkit and krunkit support multiple virtiofs mounts but minikube
--mount-* flags are not ready for multiple mounts. We have the same
issue with KIC drivers, supporting multiple mounts but using only one.
We hope to improve this in the next release.

Example usage:

    minikube start --mount-string ~/models:/mnt/models

The arguments are parsed and validated when configuring the driver, so
invalid arguments fail quickly without starting the driver. The
validated mounts are stored in the machine config:

    $ jq '.Driver.VirtiofsMounts' < ~/.minikube/machines/minikube/config.json
    [
      {
        "HostPath": "/Users/joe/models",
        "GuestPath": "/mnt/models",
        "Tag": "f845b54d-00e3-493d-9541-3b37490b96db"
      }
    ]

Minikube generates a new random UUID for every virtiofs mount to
identify the file system inside the guest. In krunkit and vfkit, every
mount is add as:

    --device virtio-fs,sharedDir=/host-path,mountTag=f845b54d-00e3-493d-9541-3b37490b96db

When the guest is started the shared directory is mounted via SSH using:

    sudo mkdir -p /mnt/models
    sudo mount -t virtiofs f845b54d-00e3-493d-9541-3b37490b96db /mnt/models

Example mount:

    $ minikube ssh findmnt /mnt/models
    TARGET      SOURCE                               FSTYPE   OPTIONS
    /mnt/models f845b54d-00e3-493d-9541-3b37490b96db virtiofs rw,relatime

More work is needed to add VirtioFS to qemu. I'm starting with vfkit and
krunkit since they have identical interface (krunkit was designed as
drop-in replacement for vfkit).
2025-08-20 21:12:45 -07:00
Nir Soffer 35446b7bd5 drivers: Add common/virtiofs package
The package provides functions for parsing and validating mount string
and setting up the mount inside the guest.
2025-08-20 21:12:45 -07:00
Medya Ghazizadeh 050e5ad623
fix preload tool build (#21367)
* fix preload tool build

* refactor: use ImageInspect and containerd errdefs

* using errdefs since docker client err is depricated
2025-08-19 17:27:33 -07:00
minikube-bot c4c81c06df
Addon Volcano: Update volcano images from v1.12.1 to v1.12.2 (#21351) 2025-08-18 13:22:37 -07:00
minikube-bot 5a0afc2cbe
Addon kong: Update kong image from 3.9.1 to 3.9.1 (#21350) 2025-08-18 13:18:42 -07:00
minikube-bot 3074d2a1a2
CNI: Update cilium from v1.18.0 to v1.18.1 (#21349) 2025-08-18 13:10:44 -07:00
Nir Soffer 6fbe84c7d2
test: Initial support for virtiofs mounts (#21272)
* test: Add findmnt package

When testing mounts we can use findmnt --json output to parse the output
cleanly. The package provides only ParseOutput() now, but it can be
extended later to run the findmnt command.

* test: Support virtiofs mounts

Use findmnt command to get the mounted filesystem details cleanly.

We use the actual mount fstype instead of driver name check so we can
switch drivers to virtiofs without changing the test.

For virtiofs mount we skip options validation since we don't support
setting virtiofs options yet, and the options are not the same as 9p
options.

For 9p mounts the uid= and gid= flags were fixed to match the real flags
(dfltuid=,dfltgid=). The issue was hidden by imprecise string matching.
2025-08-18 12:54:03 -07:00
minikube-bot 7f42627f20
update image constants for kubeadm images (#21347) 2025-08-18 12:46:23 -07:00
minikube-bot 63a496bf4d
Update go from 1.24.0 to 1.24.6 (#21348)
* Update go from 1.24.5 to 1.24.6

* Updating kicbase image to v0.0.47-1755508051-21348
2025-08-18 12:38:34 -07:00
minikube-bot 2435fcec0d
Addon ingress: Update ingress-nginx/controller image from v1.13.0 to v1.13.1 (#21353) 2025-08-18 12:37:58 -07:00
minikube-bot 07c0169084
Addon cloud-spanner: Update cloud-spanner-emulator/emulator image from 1.5.39 to 1.5.40 (#21359) 2025-08-18 10:51:53 -07:00
Predrag Rogic 358a142c96
fix k8s v1.33.3 etcd image version (#21337) 2025-08-14 17:05:56 -07:00
minikube-bot 03a3c91ab6
Kicbase/ISO: Update crun from 1.23 to 1.23.1 (#21330)
* Kicbase/ISO: Update crun from 1.23 to 1.23.1

* Updating kicbase image to v0.0.47-1755081124-21330
2025-08-14 10:57:31 -07:00
minikube-bot 08979339be
update Kubernetes versions list (#21334) 2025-08-14 10:51:30 -07:00
Andres Morey e419f76838
new: upgrade kubetail addon to 0.13.3 (#21244)
* chore: kubetail-dashboard => 0.6.3
* chore: kubetail-cluster-api => 0.4.2
* chore: kubetail-cluster-agent => 0.4.2
* new: remove token-based csrf config options from addon templates
* new: update addon config to new schema

Signed-off-by: Andres Morey <andresmarcel@gmail.com>
2025-08-12 02:25:33 -07:00
minikube-bot 0b172edac8
update image constants for kubeadm images (#21307) 2025-08-12 02:17:37 -07:00
Predrag Rogic 81b4fc9488
remove deprecated proxy-refresh-interval v2 etcd flag (#21278) 2025-08-12 01:53:41 -07:00
minikube-bot dc2d618ead
Addon kubevirt: Update bitnami/kubectl image from 1.33.3 to 1.33.3 (#21283) 2025-08-12 01:18:09 -07:00
minikube-bot 88968db1d2
update Kubernetes versions list (#21280) 2025-08-12 00:05:03 -07:00
minikube-bot 257f6b8a68
Addon kong: Update kong/kubernetes-ingress-controller image from 3.5.0 to 3.5.1 (#21282) 2025-08-12 00:04:12 -07:00
minikube-bot 45ca0d4d57
Addon cloud-spanner: Update cloud-spanner-emulator/emulator image from 1.5.38 to 1.5.39 (#21287) 2025-08-11 17:51:44 -07:00
Nir Soffer a82e25af0e
start: Simpler and safer mount on start (#21250)
The --mount-string argument defaults to `/Users` on darwin, and
homedir.Homedir() on other platforms (e.g. $HOME on unix).

This is wrong in many ways:

- `/Users` is not HOME on darwin (the right path is `/Users/$USER`).
  Using the default mount we cannot access anything inside the guest in
  the user home directory.  We can access the special `/Users/Shared`
  directory, but this should not be a default mount.

- Mounting the user home directory inside the guest in read-write mode
  is a horrible default. This exposes the users private keys in .ssh/ to
  the guest, any sensitive files in the user home directory, and allows
  the guest to change any file on the host.

- Using the `--mount` option mount the default mount directory silently.
  This is unexpected, surprising, and not documented in the minikube
  handbook[1].

Example access to user private key from the guest with the default
mount:

    $ minikube start --mount

    $ minikube ssh cat /minikube-host/.ssh/id_ed25519
    -----BEGIN OPENSSH PRIVATE KEY-----
    ...
    -----END OPENSSH PRIVATE KEY-----

Fixed by removing the default mount directory and changing mount logic
to check for non-empty mount-string instead of the mount flag.

The mount flag is kept for backward compatibility, but its value is
ignored. In the next release we want to use this flag for supporting
multiple mounts.

Example usage before:

    minikube start --mount --mount-string ~/models:/mnt/models

Example usage after:

    minikube start --mount-string ~/models:/mnt/models

Breaking changes:

User depending the default mount will have to replace the command:

    minikube start --mount

With:

    minikube start  --mount-string $HOME:/minikube-host

[1] https://minikube.sigs.k8s.io/docs/handbook/mount/
2025-08-11 11:38:58 -07:00
Nir Soffer 62529ec03e
spelling: Fix spelling errors with codespell (#21273)
Fix trivial spelling errors using codespell[1]:

    codespell --skip '*.yaml,*.tmpl,*.json,*.html,*.patch,go.sum' -w

And rejecting some false positives fixes:

    ./CHANGELOG.md:907: fliter ==> filter
    ./third_party/go9p/clnt_write.go:48: Writen ==> Written
    ./third_party/kubeadm/app/features/features.go:69: AtLeast ==> at least
    ./site/content/en/docs/contrib/translations.md:106: certificats ==> certificates
    ./site/content/en/docs/contrib/translations.md:113: espace ==> escape
    ./site/content/en/docs/tutorials/amd.md:75: HSA ==> HAS
    ./site/content/en/docs/tutorials/amd.md:87: HSA ==> HAS
    ./pkg/minikube/config/extra_options_test.go:143: expRes ==> express
    ./pkg/minikube/config/extra_options_test.go:151: expRes ==> express
    ./pkg/minikube/config/extra_options_test.go:152: expRes ==> express
    ./pkg/minikube/config/extra_options_test.go:168: expRes ==> express
    ./pkg/minikube/config/extra_options_test.go:177: expRes ==> express
    ./pkg/minikube/config/extra_options_test.go:178: expRes ==> express

There are more spelling errors that need manual selection:

    ./CHANGELOG.md:234: issuse ==> issue, issues
    ./CHANGELOG.md:543: Pris ==> Prise, Prism
    ./hack/benchmark/time-to-k8s/page.go:73: readin ==> reading, read in
    ./hack/benchmark/image-build/generate-chart.go:82: INTERATIVE ==> INTERACTIVE, ITERATIVE
    ./hack/benchmark/image-build/generate-chart.go:87: INTERATIVE ==> INTERACTIVE, ITERATIVE
    ./hack/benchmark/image-build/generate-chart.go:137: INTERATIVE ==> INTERACTIVE, ITERATIVE
    ./hack/benchmark/image-build/generate-chart.go:162: interative ==> interactive, iterative
    ./hack/benchmark/image-build/generate-chart.go:195: INTERATIVE ==> INTERACTIVE, ITERATIVE
    ./third_party/go9p/fmt.go:132: Tread ==> Thread, Treat
    ./third_party/go9p/fmt.go:133: Tread ==> Thread, Treat
    ./third_party/go9p/p9.go:33: Tread ==> Thread, Treat
    ./third_party/go9p/p9.go:170: Tread ==> Thread, Treat
    ./third_party/go9p/p9.go:171: Tread ==> Thread, Treat
    ./third_party/go9p/p9.go:225: Tread ==> Thread, Treat
    ./third_party/go9p/p9.go:263: Tread ==> Thread, Treat
    ./third_party/go9p/packt.go:165: Tread ==> Thread, Treat
    ./third_party/go9p/packt.go:168: Tread ==> Thread, Treat
    ./third_party/go9p/srv_srv.go:305: Tread ==> Thread, Treat
    ./third_party/go9p/srv_srv.go:349: Tread ==> Thread, Treat
    ./third_party/go9p/unpack.go:170: Tread ==> Thread, Treat
    ./site/content/en/docs/tutorials/multi_control_plane_ha_clusters.md:145: Virual ==> Virtual, Visual, Viral
    ./pkg/drivers/krunkit/krunkit.go:392: Terminte ==> Terminate, Termite
    ./pkg/drivers/common/common.go:283: drawin ==> drawing, draw in, drawn
    ./pkg/drivers/kic/oci/oci.go:175: stroed ==> stored, stroked, strode
    ./pkg/minikube/out/out.go:412: isT ==> is, it, its, it's, sit, list
    ./pkg/minikube/out/out.go:413: isT ==> is, it, its, it's, sit, list
    ./pkg/minikube/out/out.go:414: isT ==> is, it, its, it's, sit, list
    ./pkg/minikube/shell/shell_test.go:152: writed ==> wrote, written, write, writer
    ./pkg/minikube/bootstrapper/kubeadm/kubeadm.go:710: wil ==> will, well

If we find a way to prevent the false positives we can use this command
for spell checking in the CI.

[1] https://github.com/codespell-project/codespell
2025-08-11 11:27:20 -07:00
minikube-bot eeecb12130
CNI: Update flannel from v0.27.0 to v0.27.2 (#21230) 2025-08-09 15:37:42 -07:00
VerlorenerReisender d0a21be532
improve docker service reliability, update docker systemd files (#21174)
* docker: update template for docker.service

* wait for docker

* fix unit test
2025-08-09 14:49:55 -07:00
Nir Soffer 5d4d03623b
drivers: Extract drivers/common package (#21266)
Move all files and packages which are not a driver to the drivers/common
package. This helps to understand the structure of the code.

While moving, move the iso_test.iso into testdata/test.iso to separate
code and test data.

While fixing the test iso path fix few bugs in the tests using wrong iso
path. The test failed because the iso path was wrong instead of issue
with source or destination path.

New directory structure:

    % tree -L1 pkg/drivers
    pkg/drivers
    ├── common
    ├── hyperkit
    ├── kic
    ├── krunkit
    ├── kvm
    ├── none
    ├── qemu
    ├── ssh
    └── vfkit
2025-08-08 22:50:57 -07:00
Medya Ghazizadeh 6b0b64e1db
UI: do not show "create github issue" twice if kubeadm init fails (#21263)
* do not show github issue in exist twice if kubeadm

* Reset the flag for each test case
2025-08-08 17:59:03 -07:00
Aaron Nall fc70407316
Add support to docker runtime for OCI access to NVIDIA GPUs (#20959)
* Add support for --device=nvidia.com/gpu=all

* Add "nvidia.com" to valid options for gpus flag in TestValidateGPUs.
2025-08-07 11:23:31 -07:00
James World f4dd7b4fbf
Fix minikube load on windows (#20529) (#20921)
getWindowsVolumeNameCmd uses the deprecated wmic.exe.

See https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic for
details.

Replace the implementation with a call to the Powershell equivalent.

Look in path and system environment vars to locate Powershell.

Improve Powershell discovery
2025-08-07 11:21:38 -07:00
minikube-bot 28c84c7596
Kicbase/ISO: Update docker from 28.3.2 to 28.3.3 (#21248)
* Kicbase/ISO: Update docker from 28.3.2 to 28.3.3

* Updating kicbase image to v0.0.47-1754427148-21248
2025-08-06 12:03:12 -07:00
Medya Ghazizadeh 95d4cfe1a0
Refactor spinner library & hide sub steps after spinning (#21215)
* remove omitnew line

* add new option to hide after spin

* refactor to use new return hideAfterSpin

* add new line by default only when not spinining and delegate spinner newline to spinner code

* add new func for ouptputing with spinner and pass fdwriter directly to the spininer func

* fix unit test

* fix lint for krunkit

* add comment and context

* use different spinning progress bar for sub steps

* make func private

* making more spinning icons

* integration test dont expect sub steps to be visible

* fix unit test and comment why

* change sub step spining icon not to be a progressbar

* pass the filewriter to the spinner library for the spinning steps
2025-08-05 11:09:33 -07:00
minikube-bot 7ce514291e
Addon ingress: Update ingress-nginx/controller image from v1.12.3 to v1.13.0 (#21232) 2025-08-04 17:42:54 -07:00
minikube-bot 19613ca41b
update image constants for kubeadm images (#21221) 2025-08-04 16:53:54 -07:00
minikube-bot 08b1211ee4
CNI: Update cilium from v1.17.5 to v1.18.0 (#21226) 2025-08-04 16:53:35 -07:00
minikube-bot 0569f1bb66
update Kubernetes versions list (#21222) 2025-08-04 16:51:39 -07:00
minikube-bot 27e44deb9a
Addon inspektor-gadget: Update inspektor-gadget image from v0.42.0 to v0.43.0 (#21240) 2025-08-04 16:51:17 -07:00
minikube-bot e400496211
Addon kong: Update kong image from 3.9.1 to 3.9.1 (#21229) 2025-08-04 16:44:19 -07:00
minikube-bot 6583bf44f1
Addon nvidia-device-plugin: Update nvidia/k8s-device-plugin image from v0.17.2 to v0.17.3 (#21225) 2025-08-04 16:42:47 -07:00
minikube-bot ba11da9066
HA (multi-control plane): Update kube-vip from v0.9.2 to v1.0.0 (#21228) 2025-08-04 16:42:01 -07:00