Commit Graph

26406 Commits (2f420fc02985addb81a00df7f9b35e77e94809b5)

Author SHA1 Message Date
Byounguk Lee 2f420fc029 test: Verify and log iso version in iso_test.go
Signed-off-by: Byounguk Lee <nimdrak@gmail.com>
2025-10-29 11:24:52 +00:00
Medya Ghazizadeh c3c7ac9b3b
Merge pull request #21816 from minikube-bot/gendocs
docs: Update auto-generated docs and translations
2025-10-28 11:14:28 -07:00
minikube-bot 04060b0cb5 Update auto-generated docs and translations 2025-10-27 20:59:16 +00:00
Medya Ghazizadeh c3d85b0485
Merge pull request #21683 from nirs/remove-viper-checks
cleanup: remove viper calls outside of cmd - part 1
2025-10-27 13:56:42 -07:00
Medya Ghazizadeh b71c807efc
Merge pull request #21801 from nirs/iso-test
test: Fix guest_env_test.go
2025-10-27 13:55:26 -07:00
Medya Ghazizadeh 9bee0ef66f
Merge pull request #21796 from minikube-bot/auto_bump_nvidia_device_plugin_version
Addon nvidia-device-plugin: Update nvidia/k8s-device-plugin image from v0.17.4 to v0.18.0
2025-10-27 13:36:55 -07:00
Medya Ghazizadeh e633ccd103
Merge pull request #21795 from minikube-bot/auto_bump_gh_version
CI: Update gh from 2.82.0 to 2.82.1
2025-10-27 13:36:29 -07:00
Medya Ghazizadeh 274608a796
Merge pull request #21784 from minikube-bot/gendocs
docs: Update auto-generated docs and translations
2025-10-27 13:36:03 -07:00
Medya Ghazizadeh 4d040c9edb
Merge pull request #21794 from minikube-bot/auto_bump_cilium_version
CNI: Update cilium from v1.18.2 to v1.18.3
2025-10-27 13:32:48 -07:00
Medya Ghazizadeh 4138b0eef2
Merge pull request #21809 from minikube-bot/auto_bump_kubeadm_constants
build: Bump kubeadm constants for kubernetes images
2025-10-27 13:30:28 -07:00
Medya Ghazizadeh f9db067624
Merge pull request #21797 from minikube-bot/auto_bump_cri_dockerd_version
Kicbase/ISO: Update cri-dockerd from v0.4.0 to v0.4.0
2025-10-27 13:30:15 -07:00
Medya Ghazizadeh ca703f90cf
Merge pull request #21814 from kubernetes/dependabot/github_actions/actions/download-artifact-6.0.0
Build(deps): Bump actions/download-artifact from 5.0.0 to 6.0.0
2025-10-27 13:29:15 -07:00
Medya Ghazizadeh eaf237f7d5
Merge pull request #21813 from kubernetes/dependabot/github_actions/actions/upload-artifact-5.0.0
Build(deps): Bump actions/upload-artifact from 4.6.2 to 5.0.0
2025-10-27 13:29:06 -07:00
dependabot[bot] 27a18f72aa
Build(deps): Bump actions/download-artifact from 5.0.0 to 6.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](634f93cb29...018cc2cf5b)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 18:41:18 +00:00
Nir Soffer 3dc60e2e5d test: Speed up iso test with --no-kubernetes
We don't need to start kubernetes for testing the ISO. On macOS the test
is 2.45 times faster (from 17.137 seconds to 6.974 seconds).

Before:

    % go test -v ./test/integration -run TestISO -tags integration -count 1
    ...
    --- PASS: TestISOImage (16.27s)
        --- PASS: TestISOImage/Setup (15.76s)
        --- PASS: TestISOImage/Binaries (0.00s)
            --- PASS: TestISOImage/Binaries/crictl (0.08s)
            --- PASS: TestISOImage/Binaries/podman (0.09s)
            --- PASS: TestISOImage/Binaries/rsync (0.11s)
            --- PASS: TestISOImage/Binaries/docker (0.11s)
            --- PASS: TestISOImage/Binaries/iptables (0.11s)
            --- PASS: TestISOImage/Binaries/git (0.12s)
            --- PASS: TestISOImage/Binaries/socat (0.08s)
            --- PASS: TestISOImage/Binaries/curl (0.08s)
            --- PASS: TestISOImage/Binaries/wget (0.08s)
        --- PASS: TestISOImage/PersistentMounts (0.00s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/toolbox (0.08s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/boot2docker (0.09s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/cni (0.09s)
            --- PASS: TestISOImage/PersistentMounts//data (0.10s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/kubelet (0.10s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/minikube (0.11s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/docker (0.07s)
    PASS
    Tests completed in 16.268875292s (result code 0)
    ok  	k8s.io/minikube/test/integration	17.137s

After:

    % go test -v ./test/integration -run TestISO -tags integration -count 1
    ...
    --- PASS: TestISOImage (5.77s)
        --- PASS: TestISOImage/Setup (5.30s)
        --- PASS: TestISOImage/Binaries (0.00s)
            --- PASS: TestISOImage/Binaries/wget (0.09s)
            --- PASS: TestISOImage/Binaries/socat (0.09s)
            --- PASS: TestISOImage/Binaries/iptables (0.10s)
            --- PASS: TestISOImage/Binaries/podman (0.10s)
            --- PASS: TestISOImage/Binaries/crictl (0.11s)
            --- PASS: TestISOImage/Binaries/git (0.11s)
            --- PASS: TestISOImage/Binaries/rsync (0.07s)
            --- PASS: TestISOImage/Binaries/docker (0.08s)
            --- PASS: TestISOImage/Binaries/curl (0.08s)
        --- PASS: TestISOImage/PersistentMounts (0.00s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/toolbox (0.08s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/boot2docker (0.09s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/cni (0.09s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/minikube (0.10s)
            --- PASS: TestISOImage/PersistentMounts//data (0.10s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/docker (0.11s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/kubelet (0.07s)
    PASS
    Tests completed in 5.7657725s (result code 0)
    ok  	k8s.io/minikube/test/integration	6.974s
2025-10-27 20:33:49 +02:00
dependabot[bot] 95cfce6211
Build(deps): Bump actions/upload-artifact from 4.6.2 to 5.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 5.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](ea165f8d65...330a01c490)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 18:31:11 +00:00
Medya Ghazizadeh 05f7c1d2b1
Merge pull request #21810 from minikube-bot/auto_update_kubernetes_versions_list
build: Update Kubernetes versions list
2025-10-27 10:36:13 -07:00
minikube-bot b15da296ef update Kubernetes versions list 2025-10-27 06:08:05 +00:00
minikube-bot 58ebac579f update image constants for kubeadm images 2025-10-27 06:01:38 +00:00
Nir Soffer 5bd82cbe61 test: Fix iso_test on arm64
Virtualbox binaries are not built in the arm64 iso. Test them only on
other architectures.

Example run:

    % go test -v ./test/integration -run TestISO -tags integration

    --- PASS: TestISOImage (17.74s)
        --- PASS: TestISOImage/Setup (17.31s)
        --- PASS: TestISOImage/Binaries (0.00s)
            --- PASS: TestISOImage/Binaries/docker (0.08s)
            --- PASS: TestISOImage/Binaries/podman (0.09s)
            --- PASS: TestISOImage/Binaries/iptables (0.10s)
            --- PASS: TestISOImage/Binaries/git (0.10s)
            --- PASS: TestISOImage/Binaries/curl (0.11s)
            --- PASS: TestISOImage/Binaries/crictl (0.11s)
            --- PASS: TestISOImage/Binaries/wget (0.06s)
            --- PASS: TestISOImage/Binaries/socat (0.07s)
            --- PASS: TestISOImage/Binaries/rsync (0.06s)
        --- PASS: TestISOImage/PersistentMounts (0.00s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/boot2docker (0.08s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/cni (0.09s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/toolbox (0.09s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/minikube (0.10s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/docker (0.10s)
            --- PASS: TestISOImage/PersistentMounts//data (0.11s)
            --- PASS: TestISOImage/PersistentMounts//var/lib/kubelet (0.06s)
2025-10-26 17:05:22 +02:00
Nir Soffer 7bf746b237 test: Fix guest_env_test.go
The test used `go:build iso` so it was not included in the integration
tests. Change to `go:build integration` so we test in the CI.

Rename the file and the test name to make it more clear that this test
is about the iso image.

Skip the test for non vm-driver, since this tests is about the iso
image.

We may need to add a similar test or adapt this test so it can be used
also with the kicbase image.

This test will be useful to validate #21800, avoiding regressions such
as #21788.
2025-10-26 17:05:22 +02:00
minikube-bot 4738b83dee Updating ISO to v1.37.0-1761414747-21797 2025-10-25 21:11:32 +00:00
minikube-bot e95554d530 Kicbase/ISO: Update cri-dockerd from v0.4.0 to v0.4.0 2025-10-25 08:08:19 +00:00
minikube-bot dade2a2e0f Addon nvidia-device-plugin: Update nvidia/k8s-device-plugin image from v0.17.4 to v0.18.0 2025-10-25 08:05:50 +00:00
minikube-bot 5c17d7a6b1 CI: Update gh from 2.82.0 to 2.82.1 2025-10-25 08:04:55 +00:00
minikube-bot 1ae3cc206f CNI: Update cilium from v1.18.2 to v1.18.3 2025-10-25 08:04:47 +00:00
Nir Soffer 0ffd4ccb2f run: Remove viper.GetBool("download-only") checks
Add run.CommandOptions.DownloadOnly option and replace
viper.GetBool("download-only") calls in minikube packages.
2025-10-24 18:11:44 +03:00
Nir Soffer 74b0d69873 notify: Remove viper interactive checks
The notify helpers accept now *run.CommandOptions and use it to check if
we can interact with the user. Modify callers to pass options using
cmd/flags.CommandOptions().
2025-10-24 18:11:44 +03:00
Nir Soffer 4f2a8a17dc firewall: Remove viper interactive check
filewall.UnblockBootpd() accepts now *run.CommandOptions and use it to
check if we can interact with the user. Update callers to pass options.
2025-10-24 18:11:44 +03:00
Nir Soffer b91345db3a vment: Remove viper interactive check
vment.ValidateHelper() accept now *run.CommandOptions and use
options.NonInteractive to check if interaction is allowed.  Update
callers to pass options from the minikube command.

Testing non-interactive mode:

    % sudo rm /etc/sudoers.d/vmnet-helper
    % sudo -k
    % out/minikube start -d krunkit --interactive=false
    😄  minikube v1.37.0 on Darwin 26.0.1 (arm64)
      Using the krunkit (experimental) driver based on user configuration

    🤷  Exiting due to PROVIDER_KRUNKIT_NOT_FOUND: The 'krunkit' provider was not found: exit status 1: sudo: a password is required
    💡  Suggestion: Install and configure vment-helper
    📘  Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/krunkit/

Testing interactive mode:

    % out/minikube start -d krunkit
    😄  minikube v1.37.0 on Darwin 26.0.1 (arm64)
    💡  Unable to run vmnet-helper without a password
        To configure vment-helper to run without a password, please check the documentation:
        https://github.com/nirs/vmnet-helper/#granting-permission-to-run-vmnet-helper
    Password:
      Using the krunkit (experimental) driver based on user configuration
    👍  Starting "minikube" primary control-plane node in "minikube" cluster
    🔥  Creating krunkit VM (CPUs=2, Memory=6144MB, Disk=20000MB) ...
    🐳  Preparing Kubernetes v1.34.1 on Docker 28.4.0 ...
    🔗  Configuring bridge CNI (Container Networking Interface) ...
    🔎  Verifying Kubernetes components...
        ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
    🌟  Enabled addons: default-storageclass, storage-provisioner
    🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
2025-10-24 18:11:44 +03:00
Nir Soffer d98d710fa3 run: Pass command options to drivers
Some drivers need command line options since they need to pass command
line options back to minikube firewall package. The way to pass command
line options to the driver is via the NewDriver function, called by the
registry Loader function.

The registry Loader function is called by machine.LocalClient.Load,
which is part of the limachine API interface, which is not part of
minikube so we cannot change it. We pass the options to
machine.NewAPIClient(), so the client can pass the options to Load().

Some drivers need to validate vment helper in the registry StatusChecker
function, considering the --interactive and --download-only flags. So we
pas the options to the StatusChecker function.

This change create the options in most commands that call
machine.NewAPIClient or registry StatusChecker function and pass the
options down.
2025-10-24 18:11:44 +03:00
Nir Soffer 539567b825 run: Introduce minikube/run and cmd/flags packages
This change introduce the basic infrastructure for passing command line
options from the cmd/minikube/cmd package to other packages.

The cmd/flags package provides the CommandOptions() function returning
run.CommandOptions initialized using viper. This package keeps the
constants for command line options (e.g. "interactive") that we want to
share with various packages without accessing global state via viper.

To use options in drivers code, include CommandOptions in the
CommonDriver struct. The options will be initialized from the command
line options when creating a driver.

The basic idea is to create options in the command:

    options := flags.CommandOptions()

And pass it to other packages, where code will use:

    if options.NonInteractive {

Instead of:

    if viper.GetBool("interactive") {

This is type safe and allows reliable parallel testing.
2025-10-24 18:11:18 +03:00
Medya Ghazizadeh 5ca02f9f57
Merge pull request #21786 from nirs/registry-creds-fix
registry-creds: Fix segfault without config file
2025-10-23 11:15:11 -07:00
Nir Soffer 45979b9a72 registry-creds: Fix segfault without config file
In #20255 we added an option to use a configuration file instead of
interactive mode, but the change broke interactive mode. Current
minikube segfaults on start:

    % ./out/minikube addons configure registry-creds
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x1067603dc]

    goroutine 1 [running]:
    k8s.io/minikube/cmd/minikube/cmd/config.processRegistryCredsConfig({0x106858a06, 0x8}, 0x0)
            /Users/nir/src/minikube/cmd/minikube/cmd/config/configure_registry_creds.go:93 +0x2c
    k8s.io/minikube/cmd/minikube/cmd/config.init.func8(0x140001f2b00?, {0x140003a83a0, 0x1, 0x106850650?})
            /Users/nir/src/minikube/cmd/minikube/cmd/config/configure.go:69 +0x24c
    github.com/spf13/cobra.(*Command).execute(0x10a088d40, {0x140003a8350, 0x1, 0x1})
            /Users/nir/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1019 +0x82c
    github.com/spf13/cobra.(*Command).ExecuteC(0x10a084880)
            /Users/nir/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x384
    github.com/spf13/cobra.(*Command).Execute(...)
            /Users/nir/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071
    k8s.io/minikube/cmd/minikube/cmd.Execute()
            /Users/nir/src/minikube/cmd/minikube/cmd/root.go:174 +0x550
    main.main()
            /Users/nir/src/minikube/cmd/minikube/main.go:95 +0x250

The issue is that loadAddonConfigFile() returns nil if the --config-file
flag is not specified, but the code expects non-nil config, handling
zero value as interactive mode. Fixed by returning zero value config in
this case.

With this change we run the normal interactive flow:

    % ./out/minikube addons configure registry-creds

    Do you want to enable AWS Elastic Container Registry? [y/n]: n

    Do you want to enable Google Container Registry? [y/n]: n

    Do you want to enable Docker Registry? [y/n]: y
    -- Enter docker registry server url: docker.io
    -- Enter docker registry username: nirs
    -- Enter docker registry password:

    Do you want to enable Azure Container Registry? [y/n]: n
      registry-creds was successfully configured

    % out/minikube addons enable registry-creds
      registry-creds is a 3rd party addon and is not maintained or verified by minikube maintainers, enable at your own risk.
      registry-creds does not currently have an associated maintainer.
        ▪ Using image docker.io/upmcenterprises/registry-creds:1.10
    🌟  The 'registry-creds' addon is enabled

Note that this addon does not work on arm64 since we have only amd64
image. The pod fail to start:

    % kubectl logs deploy/registry-creds -n kube-system
    exec /registry-creds: exec format error
2025-10-23 00:20:40 +03:00
Medya Ghazizadeh ec7f42e644
Merge pull request #21773 from afbjorklund/crio-depends
Remove old obsolete Podman kubic repository
2025-10-22 11:54:38 -07:00
minikube-bot 45c4883963 Update auto-generated docs and translations 2025-10-22 18:44:46 +00:00
Medya Ghazizadeh 30a59318ae
Merge pull request #21777 from minikube-bot/gendocs
docs: Update auto-generated docs and translations
2025-10-22 11:43:56 -07:00
Medya Ghazizadeh 4d35aefea7
Merge pull request #21426 from bobsira/fit-windows-unit-tests-chown-trykill
test:  fix TestTryKillOne unit test on windows
2025-10-22 11:42:15 -07:00
minikube-bot 05cbdb2488 Update auto-generated docs and translations 2025-10-22 18:29:06 +00:00
Medya Ghazizadeh dbbc2c2d56
Merge pull request #21738 from bobsira/fix-win-unit-test-TestGetStoragev1
test: Fix TestGetStoragev1 unit test on windows
2025-10-22 11:26:45 -07:00
Bob Sira 9d74e1f1d9 fix Windows unit test failures for TestTryKillOne 2025-10-21 16:52:52 +01:00
Medya Ghazizadeh 32550882d8
Merge pull request #21765 from minikube-bot/auto_bump_gh_version
CI: Update gh from 2.81.0 to 2.82.0
2025-10-20 16:06:01 -07:00
Medya Ghazizadeh 6e576023ec
Merge pull request #21625 from nirs/kvm-driver-internal
kvm: remove dependency on external driver
2025-10-20 12:51:02 -07:00
Medya Ghazizadeh 776f6025e7
Merge pull request #21611 from henry3260/my-fix-branch
docs: Add vfkit and krunkit options in ISSUE_TEMPLATE (#21604)
2025-10-20 12:12:02 -07:00
minikube-bot 8990789ccd Updating kicbase image to v0.0.48-1760939008-21773 2025-10-20 06:03:46 +00:00
Anders F Björklund 1c2ba38adc Remove old obsolete kubic repository
The podman installation is now coming from Debian instead,
and the cri-o package also includes conmon and crun now.
2025-10-20 07:13:04 +02:00
Nir Soffer 4089e1ca2a kvm: Build kvm driver only for linux/amd64
The build fails on linux/arm64 because libvirt.org/go/libvirt is using
CGO, and cross compiling CGO requires a C cross compiler. Setting
GOARCH=arm64 is not enough. The issue is tracked in
https://github.com/kubernetes/minikube/issues/19959.

Previously we built the kvm driver also on arm64 as part of the
docker-machine-driver-kvm2 executable, but the build was skipped on
arm64.

Now that we build the driver as part of minikube, we cannot skip the
entire build. Change the build tag so the libvirt bits are built only on
amd64.

To make this possible, the generic linux bits needed by the registry
moved to pkg/drivers/kvm/driver.go, and a kvm_stub.go is used for
unsupported architectures.

In the registry Driver.Status(), move the arm64 check to front since
there is no point in checking that libvirt is installed correctly if the
driver is not supported yet.
2025-10-19 17:22:23 +03:00
Nir Soffer 7bc97d7ce1 kvm: Convert to internal driver
Remove the docker-machine-driver-kvm2 wrapper and use the kvm driver as
internal driver.

To avoid dependency on libvirt shared library on Linux, we build now
with the libvirt_dlopen build tag. This is used only linux to avoid
linking with libvirt shared library. This is not documnted but can be
found in the source.
f7cdeba997/domain.go (L30)

With this we don't need libvirt devel libraries during build, and in
runtime we will fail if libvirt shared library is not installed.

With this change minikube can not be built for linux !amd64 since building
libvirt go binding requires CGO, and it does not work by changing GOARCH.
2025-10-19 17:20:47 +03:00
minikube-bot 7490a298eb CI: Update gh from 2.81.0 to 2.82.0 2025-10-18 08:04:53 +00:00
Medya Ghazizadeh 9124b8ab6a
Merge pull request #21758 from medyagh/update_crons
CI: Update cron jobs to run on Saturday 1 AM instead of Monday
2025-10-16 13:33:01 -07:00