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()
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.
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)
* 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.
* 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
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/
* 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
* 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
* 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>
* 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>
* 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
* 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