Commit Graph

2128 Commits (dependabot/go_modules/k8s.io/api-0.34.1)

Author SHA1 Message Date
Nir Soffer ce0ab00360 Update Kubernetes versions
We use constants.OldestKubernetesVersion for testing the oldest version
and limiting --kubernetes-version when starting the clusters. Our
tradition is testing 6 releases back from current version, but we were
testing 14 release back (1.20.0).

For upgrading containerd to latest version (v2.1.4) we need to upgrade
to a newer release. Upgrade constants.OldestKubernetesVersion to 1.28.0
which seems to pass all tests.

legacyVersion() used in version_upgrade_test.go was 1.26.0. The comment
in file mention that this should be release from the last 6 month. We do
see failures in the relevant tests (TestRunningBinaryUpgrade) in many
builds so I bumped it as well to 1.32.0 (2 releases back from current).

In preload_test.go we tested --kubernetes-version=1.24.4 which is not
compatible with containerd v2. Use legacyVersion() instead so we don't
need to maintain another version.

We had many example of --kubernetes-version in the docs using older
version which are not supported. Replace all example with current
version to minimize future maintenance. We need to automated this later
so updating the version in minikube will also update the examples.

With this change we have 2 places to update kubernetes versions:
- constants.*KubernetesVersion
- legacyVersion()
2025-09-04 20:42:12 +03:00
Nir Soffer 8bcf08bbf7 test: Remove darwin hardcoded parallel limit
On darwin parallel was limited to 2 instead of nproc/1.75.  Hopefully
this will speed up integration tests that take about 1 hour with the
hard coded limit.
2025-09-03 00:56:16 +03:00
Nir Soffer 65ef5bd2c4 test: Usse kickbase/echo-server for service tests
The echoserver-arm:1.8 image is not an arm64 image:

    % kubectl create deployment echoserver --image registry.k8s.io/echoserver-arm:1.8
    deployment.apps/echoserver created

    % kubectl logs deploy/echoserver
    exec /usr/sbin/nginx: exec format error

    % minikube ssh -- sudo nerdctl -n k8s.io image ls registry.k8s.io/echoserver-arm:1.8
    REPOSITORY                        TAG    IMAGE ID        CREATED               PLATFORM       SIZE        BLOB SIZE
    registry.k8s.io/echoserver-arm    1.8    b33d4cdf6ed0    About a minute ago    linux/amd64    90.1 MiB    43.2 MiB

Replace with kickbase/echo-server we used in other tests.

With this change ServerCmdConnect pass. The other test using the broken
arm image was not failing, maybe it was not checking the deployment
status properly.

Functional tests time reduced from 230 seconds to 200 seconds:

    --- FAIL: TestFunctional (200.87s)
2025-08-22 19:46:16 -07:00
Nir Soffer cb07147efe test: Add contants_test file
Currently keeping one constant for kickbase/echo-server used in the
image tests. We want to use this in other tests.
2025-08-22 19:46:16 -07:00
Medya Ghazizadeh f5aa17d7f7
ci: add network settings to post-mortem logs and improve timeout detections (#21361)
* info blockL: add load average details

* log the proxy envs in the post mortems

* remove iostat

* better detection of time out
2025-08-19 11:19:00 -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
Medya Ghazizadeh 770d5ce054
test fix post-mortem not showing (#21328) 2025-08-13 11:27:44 -07:00
Medya Ghazizadeh 95fc5e5478
CI: major refactor for functional tests in github actions (#21290)
* add matrixfying

* ensure matrix jobs run after build binaries job

* use echo instead of helper

* setup-go needs go version

* make binaries executables

* chmod +x for test binaries

* install conntrack and socat for baremetal

* cancel preivous commits jobs in favor of latest job

* limit to 7 digits of sha for gopogh file

* echo gopogh url

* add run id to gopogh filename

* fix indent

* rename to build-test-binaries

* list skipped files too

* kubectl test better

* use short run id

* imrove error tet

* download kubectl to a tmp folder and remove leftover

* produce job summary

* fix names

* better results summary

* publish gopogh url in summary

* format better

* wordings

* add a new job unit test

* comment

* unit test script mkdir for coverage folder for widnows

* try to fix unit test for windows

* dont fix windows tests in this PR

* add lint job

* fix name

* separate boilerplate and add go modtidy

* install libvirt for lint

* name

* go mod tidy

* dont repeat name functional twice

* rename step

* fix comment

* fix run id

* delete debug

* adjust timeouts and treat 0 pass as failure icon

* rename job

* fix name
2025-08-12 02:24:28 -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
Medya Ghazizadeh bcf69bf6f0
ci: add qemu functional test to github action on macos13 (#21274)
* add qemu functional test to github action on macos13

* remove memory arg

* add higher wait time for qemu and nested in integration test for pvc

* higher mins for qemu/vfkit nested

* use maxwait

* add same workflow for master jobs

* bump wait
2025-08-10 12:50:01 -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
Victor Ubahakwe 958ecac9d3
Refactor table rendering (#20893)
* Refactored table rendering codes to support updated tablewriter v1.0.7

This commit makes all necessary code changes to maintain compatibility
with the new tablewriter version. The update includes several required modifications across multiple files.

Files modified:
- cmd/minikube/cmd/config/images.go
- cmd/minikube/cmd/config/addons_list.go
- cmd/minikube/cmd/config/profile_list.go
- hack/benchmark/time-to-k8s/chart.go
- hack/benchmark/time-to-k8s/cpu.go
- pkg/minikube/audit/row.go
- pkg/minikube/machine/cache_images.go
- pkg/minikube/perf/result_manager.go
- pkg/minikube/service/service.go

Now #20878 can be merged.
Addresses #20879

* The tablewriter package v1.0.7 renamed SetHeaders to SetHeader

* updated go mod and table.SetColumnAlignment([]int{0, 0, 0, 0})

* Changed syntax and added vendor to gitignore

* simplified version of tablewriter

* removed vendor

* fix addon_list

* fix images tablewrtier

* bump tablewriter for profile list

* go mod tidy

* bump tablewriter for chart

* bump tablewriter for cpu chart

* bump tablewriter for row

* bump tablewriter cache images

* bump tablewriter

* bump tablewriter

* revert file

* bump tablewritter

* fix unit test

* fix lint issues

* fix the integration test pipe char

* convert all tables to new pipe instead of asci pipe

* convert all tables to new pipe instead of asci pipe

* go mod tidy

* go work sync

---------

Co-authored-by: Medya Ghazizadeh <medya@google.com>
2025-07-21 16:20:55 -07:00
Medya Ghazizadeh d4374c42b2
test: use alpine for gvsior image in testdata (#21059)
* use alpine for gvsior image in testdata

* remove dup copy leftover
2025-07-14 14:02:47 -07:00
Predrag Rogic 4da3cedc84
Fix KVM driver (tests) timeouts (#20852)
* Fix KVM driver tests timeouts

Rewrite KVM driver waiting logic for domain start, getting ip address
and shutting domain down. Add more config/state outputs to aid future
debugging.

Bump go/libvirt to v1.11002.0 and set the minimum memory required for
running all tests to 3GB to avoid some really weird system behaviour.

* revert reduction of timelimit for TestCert tests run

* set memory and debug output in TestNoKubernetes tests

* extend kvm waitForStaticIP timeout

* add console log to debug output

* Updating ISO to v1.36.0-1748823857-20852

---------

Co-authored-by: minikube-bot <minikube-bot@google.com>
2025-06-03 15:07:48 -07:00
Sri Panyam 7b97f424c7
New flag to allow option for passing a config file for addon configure command. (#20255)
* Addon configuration now takes an optional config file to load from
instead of forcing prompts

Fixes #20124

* Using a rarer value for default instead of changeme so it has less chance to interfere with other possible user defaults

* Fixing expected values of test cases

* making addonConfigFile private

* Keeping registry_creds configs together.

* Starting a typed AddonConfig struct so each addon con loads its
  configs in a typed way.
* Started configs for RegistryCreds using this convention and moved
  registry_creds config processing to its own file
  (configure_registry_creds.go)

* Making registry creds structs private and other PR feedback cleanups

* Changing default value back to 'changeme'

* Simplifying duplicate consts

* Adding missed comma

* lint fixes

* Generating docs

* Copyright for new file
2025-05-13 11:05:48 -07:00
Predrag Rogic c8a63fa11f
Fix waiting for all pods having specified labels to be Ready (#20315)
* Fix waiting for all kube-system pods having one of specified labels to be Ready

* Fix waiting for all kube-system pods having one of specified labels to be Ready

* Fix waiting for all kube-system pods having one of specified labels to be Ready
2025-04-28 14:58:02 -04:00
Medya Ghazizadeh cf3ab2afdf
Merge pull request #20331 from liangyuanpeng/cleanup_old_registry
Use 'registry.k8s.io' instead of 'gcr.io/google-containers'
2025-02-04 09:07:54 -08:00
錦南路之花 abdbc5b3a3 Apply suggestions from code review
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
2025-01-28 11:42:51 -08:00
锦南路之花 3c42f1ce99 fix: fix incomplete cleanup in tunnel.json and zombie process in functional test 2025-01-28 11:42:51 -08:00
锦南路之花 1edaec55f4 test: allow running functional tests for different k8s versions 2025-01-28 11:42:51 -08:00
Lan Liang 0d214f4ff8 Use 'registry.k8s.io' instead of 'gcr.io/google-containers'
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2025-01-28 05:06:12 +00:00
Predrag Rogic ccf9e65833
remove deprecated and removed ServerSideApply feature gate (#20088) 2024-12-12 10:10:26 -08:00
cuiyourong 5fbef414cb chore: fix some function names in comment
Signed-off-by: cuiyourong <cuiyourong@gmail.com>
2024-12-07 00:45:04 +08:00
Steven Powell 412ec2a9b5
testing: Remove requesting full CPU for nginx test pod (#19802) 2024-10-17 11:57:06 -07:00
Steven Powell b578d678a1
testing: Fix GCP-Auth addon test showing as success or skipped (#19803) 2024-10-16 11:13:19 -07:00
fbyrne 50b5d8ee62 Add support for AMD GPU via --gpu=amd for docker linux amd64. 2024-10-11 21:36:06 +01:00
Steven Powell a220f0e4f0
testing: Add more addon test disable defers (#19744) 2024-10-09 11:26:27 -07:00
Steven Powell 746051d437
testing: Move bulk of GCP-Auth addon test into subtest (#19716) 2024-10-02 10:29:30 -07:00
Steven Powell b623c21174
testing: Add defer to disable addon to start of each addon test (#19715)
* testing: Add defer to disable addon to start of each addon test

* only start storage-provisioner-rancher for non-none drivers
2024-10-01 10:43:23 -07:00
Predrag Rogic 77c7b42d9a
fix cluster status check in TestMultiControlPlane 2024-09-28 21:58:42 +01:00
Tyler Auerbeck f4ded199f0
remove tiller addon (#19636)
Signed-off-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
Co-authored-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
2024-09-19 11:21:24 -07:00
錦南路之花 c38897dc95
unified minikube cluster status query (#18998)
* feat: unified minikube cluster status query

* Update pkg/minikube/cluster/status.go

Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>

* Update pkg/minikube/cluster/status.go

Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>

* Update pkg/minikube/cluster/status.go

Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>

---------

Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
2024-09-18 11:40:06 -07:00
Steven Powell d8c94a6ad6 fix new lint errors 2024-08-14 10:31:53 -07:00
锦南路之花 ab81991ff6 fix: fix empty tarball when generating image save 2024-08-07 14:38:22 -07:00
Steven Powell 52b683a16a testing: Fix volcano addon failing other addons 2024-07-25 10:10:03 -07:00
Steven Powell a90d01cfe6 fix checking for replica controller 2024-07-16 18:02:49 -05:00
Medya Gh 02a76e0c47 add docker.io to image 2024-07-11 14:34:39 -07:00
Medya Gh e2fb616836 fix tag 2024-07-11 14:34:39 -07:00
Medya Gh 041c86d464 use docker hub image 2024-07-11 14:34:39 -07:00
Medya Gh dbcd1a974e fix image tag 2024-07-11 14:34:39 -07:00
Medya Gh ca6443540a add warning when loading image with wrong arch 2024-07-11 14:34:39 -07:00
Steven Powell c1f18cfaa4 CI: Use multi-arch example app image 2024-07-09 10:16:38 -07:00
锦南路之花 1a176c398e fix: fix failed test when updating volcano 2024-06-16 18:33:21 +02:00
锦南路之花 3e10cfc387 addon: add auto updater for volcano addon 2024-05-22 11:44:06 -07:00
锦南路之花 d67dfb3d0a addon: add addon for volcano 2024-05-22 11:44:06 -07:00
Predrag Rogic d6c612fcba
improve kube-vip cp lb auto-enable 2024-03-13 01:48:48 +00:00
Medya Ghazizadeh 8ec4c89456
Merge pull request #17909 from prezha/ha
Support multi-control plane - HA clusters
2024-03-06 12:02:51 -08:00
Predrag Rogic 8c4e1a0f8b
workaround for cp bug 63245 and rename TestHA to TestMutliControlPlane 2024-03-05 01:16:08 +00:00
Predrag Rogic 6f4d0f1f3b
Merge branch 'kubernetes:master' into ha 2024-03-03 18:57:51 +00:00