Commit Graph

5755 Commits (45ee2dbacb82c82b0c980d53ca492bf864d4f573)

Author SHA1 Message Date
Medya Gh 9c9934879c break guest provision when container exists prematurely 2021-05-21 13:34:34 -07:00
Medya Ghazizadeh 9db3ae665c
Merge pull request #11325 from AkihiroSuda/cgroup2
containerd: upgrade `io.containerd.runtime.v1.linux` to `io.containerd.runc.v2` (suppot cgroup v2)
2021-05-21 13:31:22 -07:00
Medya Ghazizadeh 3f2170bb51
Merge pull request #11472 from andriyDev/ErrorCodes
Use DRV_NOT_HEALTHY when at least one driver is installed but unhealthy
2021-05-21 11:33:23 -07:00
Sharif Elgamal e89aca810a Add list of error codes to documentation 2021-05-21 11:07:59 -07:00
Andriy Dzikh d59570c1f0 Add DRV_DOCKER_NOT_RUNNING error for cases where specifically docker fails. 2021-05-21 09:43:04 -07:00
Medya Ghazizadeh d0d62a90e5
Merge pull request #11334 from daehyeok/close_asset
Add `Close() error` function into assets.CopyableFile
2021-05-21 09:23:41 -07:00
Utkarsh Srivastava aa99526399
change variable name from addonList to addonListFlag
Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>
2021-05-21 13:39:05 +05:30
Daehyeok Mun d6691e796c Add `Close() error` function into assets.CopyableFile
Add `Close` function and implemetions to explicitly close os.File which opend by
NewFileAsset.
2021-05-20 21:05:09 -07:00
Andriy Dzikh ab80af497e Create error code for found, but unhealthy drivers. 2021-05-20 14:03:08 -07:00
Andriy Dzikh 9692cae437 Add caching to PreloadExists to improve performance. 2021-05-20 13:19:58 -07:00
Andriy Dzikh 8882de007b Add check to allow downloading of listed binaries if preload is missing. 2021-05-20 10:33:06 -07:00
Andriy Dzikh b441330f7e Create unit test for excluding binaries from caching. 2021-05-20 10:18:50 -07:00
Andriy Dzikh 9fb9e940f1 Prevent `minikube start --download-only` from downloading binaries that are part of the Kubernetes release binaries. 2021-05-20 10:18:22 -07:00
Utkarsh Srivastava 69b30c06df
change variable name from addonListName to addonList
Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>
2021-05-20 22:25:38 +05:30
Utkarsh Srivastava 5a3843b074
replace addonList variable with viper provided data
Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>
2021-05-20 21:39:07 +05:30
Medya Ghazizadeh 316f5ea3b2
Merge pull request #11432 from andriyDev/CustomAddonImages
Persist custom addon image/registry settings.
2021-05-19 18:30:14 -07:00
Andriy Dzikh df32362a7f Add comments to types.go for CustomAddonImages/CustomAddonRegistries. 2021-05-19 15:26:28 -07:00
Sharif Elgamal 5b512a7296 Merge branch 'master' of github.com:kubernetes/minikube into error-codes 2021-05-19 15:26:11 -07:00
Sharif Elgamal ef304f7c05 add error codes file 2021-05-19 15:25:45 -07:00
Andriy Dzikh 88205c2e65 Allow download_test to mock checksum retrieval. 2021-05-19 09:54:03 -07:00
Andriy Dzikh 6c3113706e Create unit tests for new utility functions in pkg/minikube/assets/addons.go. 2021-05-18 14:10:39 -07:00
Andriy Dzikh 040e7e7a8d Persist custom addon image settings. 2021-05-18 14:10:37 -07:00
Andriy Dzikh 7684a14e1a Move (custom) image selection to its own function. 2021-05-18 14:09:03 -07:00
Andriy Dzikh 62b2c94c0f Refactor assets/addons.go to de-dupe map parsing. 2021-05-18 14:09:03 -07:00
Medya Ghazizadeh 4f345f2b8f
Merge pull request #11426 from afbjorklund/images-versions
Update the bootstrapper images for k8s 1.21
2021-05-18 12:23:43 -07:00
Medya Ghazizadeh adbcae1848
Merge pull request #11410 from r4j4h/upgrade-metallb-addon-metallb-version
metallb-addon: Update metallb from 0.8.2 to 0.9.6
2021-05-18 11:43:13 -07:00
Medya Ghazizadeh 8f85fd9751
Merge pull request #11438 from medyagh/autopause-vm
Fix auto-pause on VMs (detect right control-plane IP)
2021-05-18 09:18:33 -07:00
Medya Ghazizadeh e05cad71c4
Merge pull request #11355 from afbjorklund/driver-order
Sort rejected drivers by their preference order
2021-05-17 20:31:34 -07:00
Medya Gh 8ca3d1f799 remove debug 2021-05-17 18:54:02 -07:00
Medya Gh 0068f92327 add port to addons templates 2021-05-17 18:50:12 -07:00
Medya Gh 45fca194af add apiserver ip to autopause proxy 2021-05-17 18:50:12 -07:00
Medya Ghazizadeh ee9ed1c3d3
Merge pull request #11404 from prezha/host.minikube.internal
add host.minikube.internal to coredns
2021-05-17 18:46:33 -07:00
ilya-zuyev 612d4e4d58
Merge pull request #11433 from ilya-zuyev/ilyaz/fix_fmt_warning
fix "no arguments passed" warning
2021-05-17 16:28:56 -07:00
Anders F Björklund c7e8be0972 Bump the preload version and add a note
The image list was wrong for the 1.21 preload tarball

It had the pause and coredns versions from 1.20 still
2021-05-17 23:02:09 +02:00
Anders F Björklund 9f5388af73 Remove k8s 1.11 support from kubeadm images
It requires arch suffix, but that code is no longer present.

Should be OK, we have: OldestKubernetesVersion = "v1.14.0"
2021-05-17 22:51:11 +02:00
Predrag Rogic 4e967acbae
avoid error, improve test 2021-05-17 21:18:27 +01:00
Predrag Rogic 260d22cd57
rename func, add comments 2021-05-17 21:14:59 +01:00
Predrag Rogic 3ddb4e30b3
add host.minikube.internal to coredns 2021-05-17 21:14:35 +01:00
Medya Ghazizadeh 2445acacdc
Merge branch 'master' into kube-proxy-conntrack 2021-05-17 12:41:57 -07:00
Ilya Zuyev 5e2b56d808 fix "no arguments passed" warning 2021-05-17 12:37:57 -07:00
Anders F Björklund 821644d304 Add test for images used by pkg/minikube/cni 2021-05-17 12:43:23 +02:00
Anders F Björklund 839b493494 Add more tests to kubeadm for better coverage 2021-05-17 12:21:42 +02:00
Anders F Björklund eadfae3e37 Add a unittest for kubeadm bootstrapper images
Change the image order to make it easier to compare with the
output of `kubeadm images config list` for each release version.
2021-05-17 08:24:34 +02:00
Anders F Björklund 589eea90a0 Update the bootstrapper images for k8s 1.21
Including some weird changes like changing the image name and
the tagging syntax for coredns (possibly a mistake upstream)
2021-05-17 08:23:40 +02:00
Anders F Björklund 6ea7e03304 Remove integration test count from documentation 2021-05-17 08:06:19 +02:00
Anders F Björklund 610883ba55 Add documentation for all the DriverState fields 2021-05-16 09:32:31 +02:00
Anders F Björklund 6d0763648e Keep original preference, for identical priority
Unhealthy drivers have their priority lowered
2021-05-16 09:31:37 +02:00
Predrag Rogic f425739254
prevent kube-proxy trying to change nf_conntrack_max 2021-05-15 19:36:49 +01:00
Medya Ghazizadeh 707af502f3
Merge pull request #11300 from ilya-zuyev/ilyaz/gh_11293
Fix getting of gateway IP for podman driver
2021-05-14 17:04:24 -07:00
ilya-zuyev 2a2ffeb380
Merge pull request #11304 from daehyeok/copy_node
Implement target node option for cp command
2021-05-14 15:59:11 -07:00
Ilya Zuyev dcadd32624 Add comment, improve template 2021-05-14 14:38:29 -07:00
Jasmine Hegman e0838eb289
Update metallb from 0.8.2 to 0.9.6
This change isn't strictly necessary but the newer versions of metallb contain some really nice quality of life improvements, and better support newer (installed by default) versions of kubernetes better.

A sample of some improvements this brings to metallb add-on installed by minikube:
- [Layer2 doesn't update when when ip changes](https://github.com/metallb/metallb/pull/520) - this hit me, and might be hitting others
- [Allow spaces in configs](https://github.com/metallb/metallb/pull/500) - quality of life
- [selflink is deprecated](https://github.com/metallb/metallb/pull/812) - Kubernetes deprecation (I believe seeing this is in the logs is what originally caused me to look into upgrading it)
2021-05-14 09:29:14 -07:00
Anders F Björklund 748d9cb254 Use patched version of go-containerregistry
It allows adding a tag to a Digest, by doing a "docker pull"
in the daemon.Write function after doing the "docker load"

The digest is not stored in the tarball, so it cannot be
loaded from it. The alternative is instead using a Tag.
2021-05-14 17:34:07 +02:00
Anders F Björklund 3bcfe1bdc4 Move load function from image to download
Now we don't have to expose the local cache directory path,
and don't risk mixing the kicbase code with the image code.

Duplicate the digest code for now, it should use the Digest
implementation Tag() from our patched go-containerregistry.
2021-05-14 17:08:03 +02:00
Anders F Björklund 580161ad1c Load kicbase image from right cache and add log
It was silently failing to load from the (wrong) cache directory,
causing the image to be download twice from the network instead.

Add new function to get the path in the cache directory, so that
we don't have to duplicate that both inside and outside module.
2021-05-14 10:11:06 +02:00
Medya Ghazizadeh 33e26502dd
Merge pull request #11366 from spowelljr/fixImageLoad
`image load`: overwrite same image unless `--overwrite=false`
2021-05-13 21:18:29 -07:00
Medya Ghazizadeh 01328781b3
Merge pull request #11223 from andriyDev/DownloadLocks
Add locks to download functions.
2021-05-13 18:54:37 -07:00
Steven Powell e1fabfd358 only throw error if not a "no such image" error returned from remove 2021-05-13 17:23:00 -07:00
Medya Ghazizadeh 9e3a66268f
Merge pull request #11384 from dinever/kicbase-tools
Add useful tools in the Kicbase Docker image
2021-05-13 14:14:59 -07:00
Andriy Dzikh 268e91f830 Make download.imageExistsInDaemon public to fix bad compilation. 2021-05-13 11:57:01 -07:00
Andriy Dzikh c0a492b879 Improve comments for ImageToCache and ImageToDaemon. 2021-05-13 11:57:01 -07:00
Andriy Dzikh 0626bb0455 Add comment to explain lock wait timeout. 2021-05-13 11:57:01 -07:00
Andriy Dzikh 9191d03c99 Check releaser is valid before deferring release. 2021-05-13 11:57:01 -07:00
Andriy Dzikh e9c4c93afa Remove no longer relevant comment. 2021-05-13 11:57:01 -07:00
Andriy Dzikh 118eae4311 Add function comment to lockDownload. 2021-05-13 11:57:01 -07:00
Andriy Dzikh 248d030d73 Reword test fail message. 2021-05-13 11:57:01 -07:00
Andriy Dzikh f4b142c42f Rename downloads to downloadNum. 2021-05-13 11:57:01 -07:00
Andriy Dzikh fbc041d2a1 Ensure directory exists in CreateDstDownloadMock and add comments. 2021-05-13 11:57:01 -07:00
Andriy Dzikh 5e48738097 Remove SetDownloadMock and rename mockDownload to DownloadMock. 2021-05-13 11:57:01 -07:00
Andriy Dzikh ad356d5508 Move defer lock release to before error check so the lock is guaranteed to be released. 2021-05-13 11:57:00 -07:00
Andriy Dzikh a7cbc76d88 Refactor repeated mock sleep function into a single function. 2021-05-13 11:57:00 -07:00
Andriy Dzikh 4fc0ac5c8a Make download_test run tests in serial. 2021-05-13 11:57:00 -07:00
Andriy Dzikh fa0803d81e Refactor download.go to allow more complex download mocking. Modify download_test to prevent using logging. 2021-05-13 11:57:00 -07:00
Andriy Dzikh 5af0dcf3aa Use spinner for lock message. 2021-05-13 11:57:00 -07:00
Andriy Dzikh e0a6887bab Add message saying when download is waiting for a file lock. 2021-05-13 11:57:00 -07:00
Andriy Dzikh 1cc80e1e7b Move locking code to download.go. 2021-05-13 11:57:00 -07:00
Andriy Dzikh b57022d2c8 Make functions not used outside the download package private. 2021-05-13 11:57:00 -07:00
Andriy Dzikh 0a44408ce8 Add locks to binary, image, and preload downloads. 2021-05-13 11:57:00 -07:00
Andriy Dzikh 458d1d5102 Add tests for ImageToCache/Daemon that they prevent multiple downloads. 2021-05-13 11:57:00 -07:00
Andriy Dzikh dba9076cc3 Add mock mode check for ImageToCache and ImageToDaemon, similar to download.download. 2021-05-13 11:57:00 -07:00
Andriy Dzikh fd7cd15a27 Add test to check that preload prevents concurrent downloads. 2021-05-13 11:57:00 -07:00
Andriy Dzikh 4e8451af95 Create download_test and add test for Binary downloads not colliding. 2021-05-13 11:57:00 -07:00
Andriy Dzikh d6f60bbd4a Move image existence checks into downloading functions. 2021-05-13 11:57:00 -07:00
Andriy Dzikh 26634c18a8 Move image functions related to downloading to the download package. 2021-05-13 11:57:00 -07:00
Medya Ghazizadeh c97984a4b9
Merge pull request #11392 from dinever/fix-docker-version-test
Fix TestCheckDockerVersion on macOS
2021-05-13 11:44:31 -07:00
Daehyeok Mun 7c2e963392 Implement target node option for cp command 2021-05-13 10:47:09 -07:00
Peixuan Ding 6bfbb7c33a Fix TestCheckDockerVersion on macOS 2021-05-12 17:30:29 -04:00
Steven Powell 16dbac1f66 check if image exists before trying to remove it 2021-05-12 14:26:34 -07:00
Steven Powell e59ced9029 updated flag description and renamed force arg to overwrite and made it non-optional 2021-05-12 14:26:34 -07:00
Steven Powell 32a91d6eb2 image load loads image even if name:tag already exists 2021-05-12 14:24:49 -07:00
Anders F Björklund 6ea3ffee1f Show suggestion for rejected unhealthy drivers
Normally how to add root permissions for the user, to be able to
run the "docker" or "podman" driver (through group or through sudo)
2021-05-12 07:15:26 +02:00
minikube-bot e8b16a5247 Updating kicbase image to v0.0.22-1620785771-11384 2021-05-12 02:25:58 +00:00
Medya Ghazizadeh c214b040e6
Merge pull request #11381 from sharifelgamal/test-doc
Make sure all tests have comments
2021-05-11 18:05:36 -07:00
Sharif Elgamal 7982396834 remove unnecessary logging from extract 2021-05-11 16:56:15 -07:00
Sharif Elgamal 80bb2999e4 remove last newline 2021-05-11 15:32:57 -07:00
Sharif Elgamal 972dae8133 Make sure all tests have comments 2021-05-11 15:17:43 -07:00
Medya Ghazizadeh c136fe3cfd
Merge pull request #11060 from afbjorklund/retro-arch
Allow building minikube for outdated architectures
2021-05-11 12:22:03 -07:00
Anders F Björklund acadaa6736 Don't reload from tarball if image exists in daemon 2021-05-10 12:57:37 +02:00
Medya Ghazizadeh d9482f68e0
Revert "base-image: Allow using podman as well as docker daemon" 2021-05-09 10:43:53 -07:00
Medya Ghazizadeh 807440a8a9
Merge pull request #11063 from afbjorklund/daemon-podman
Allow using podman as well as docker daemon
2021-05-07 17:01:06 -07:00