Commit Graph

2728 Commits (27d738657c9c7b1ae4578b28c094a57c8ad1f7f2)

Author SHA1 Message Date
ilya-zuyev 1f2d50f297
Merge pull request #11247 from hex0punk/goroutine-leak-fix
Goroutine leak fix
2021-05-11 12:02:54 -07:00
Anders F Björklund 97b152f9a8 Fix error picking non-default alternate drivers
We should not select drivers like "ssh" or "none",
unless explicitly requested by the user. Wrong var...
2021-05-11 18:00:39 +02:00
Anders F Björklund fb728a8893 Switch place of minikube image ls and list
Just to make it more similar to the docker image commands.

Both ls/list and rm/remove are equivalent commands, though.
2021-05-09 09:37:02 +02:00
Medya Ghazizadeh 8f167f4213
Merge pull request #10899 from daehyeok/overwrite_flag
Refactoring generate/update config file code.
2021-05-07 16:30:15 -07:00
Medya Ghazizadeh a2d62511d2
Merge pull request #11191 from zhijianli88/shell-completion
completion: add specific shell completion
2021-05-07 16:16:54 -07:00
Daehyeok Mun 50637dd149 clean up `updateExistingConfigFromFlags` function.
Add missing flags to overwrite.
Reuse validate/set function from `generateNewClusterConfig`
2021-05-06 14:07:43 -07:00
Daehyeok Mun afc9ed5222 Clean up `generateNewConfigFromFlags` function
split validate/set code with helper function to reuse later.
2021-05-06 14:07:43 -07:00
Medya Ghazizadeh 65692f3181
Merge pull request #11294 from andriyDev/UsernameMixin
Add the current user's name to log file hashes to prevent collision.
2021-05-06 10:22:46 -07:00
Andriy Dzikh 5776597eb3 Move deferred close to before error exit. 2021-05-05 16:18:15 -07:00
Andriy Dzikh 98f4d4706b Add --file flag to 'minikube logs' to automatically put logs into a file. 2021-05-05 16:18:15 -07:00
Andriy Dzikh 65c0f0ff35 Add the current user's name to log file hashes to prevent collision. 2021-05-05 12:38:47 -07:00
Sharif Elgamal e27e9a1e1b return pointer to k8sissue 2021-05-03 12:25:17 -07:00
Sharif Elgamal 9dbe957234 Merge branch 'master' of github.com:kubernetes/minikube into warn-k8s 2021-05-03 12:22:34 -07:00
hex0punk 2474931ab3 prevents a goroutine from being leaked in call to readByteWithTimeout 2021-04-29 22:48:05 -07:00
hex0punk f0226e50a9 Revert "prevents a goroutine from being leaked in call to readByteWithTimeout"
This reverts commit 8810120de6.
2021-04-29 22:45:39 -07:00
hex0punk 8810120de6 prevents a goroutine from being leaked in call to readByteWithTimeout 2021-04-29 22:42:33 -07:00
Predrag Rogic 394def7a74
identify appropriate cni then configure cruntime accordingly 2021-04-29 23:36:46 +01:00
ilya-zuyev 9947c61a83
Merge pull request #11185 from prezha/workout-cni-and-cruntimes
improve how cni and cruntimes work together
2021-04-29 15:01:18 -07:00
Medya Ghazizadeh ac2b98d744
Merge pull request #11169 from spowelljr/addBetaNotifications
Add opt-in notifications for beta releases
2021-04-29 14:03:59 -07:00
Li Zhijian 5943260780 completion: add specific shell completion
Previously, `minikube completion` is unable to auto-complete the
specific shell as other go-lang applications. For example, when user
type below command:
```
minikube$ minikube completion <tab> <tab>
```
In minikube, there is no candidate shells coming up, which is different
from kubectl:
```
$ kubectl completion <tab> <tab>
bash  zsh
```

After this patch, as following, the candidata shell appears:
```
minikube$ minikube completion <tab> <tab>
bash  fish  zsh
```

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2021-04-29 18:30:27 +08:00
Sharif Elgamal 8657b72645 address comments 2021-04-28 17:29:28 -07:00
Sharif Elgamal fb5f275baa abstract kubernetes issues away 2021-04-28 16:01:59 -07:00
Steven Powell c9ccfece9b removed get prefix from funcs 2021-04-28 15:34:48 -07:00
Sharif Elgamal 7afe98b855 add 1.21.0 2021-04-28 08:59:15 -07:00
Sharif Elgamal 661e62aacd warn about performance for certain versions of kubernetes 2021-04-27 13:54:06 -07:00
csiepka ae450f6c7b
Correct typo in start_flags.go
Steps to reproduce the issue:
minikube start --memory=2G

Current Output (truncated):
smile minikube v1.14.1 on Linuxmint 19.3
sparkles Using the docker driver based on existing profile
exclamation You cannot change the memory size for an exiting minikube cluster. Please first delete the cluster.

Correction:
"exiting" to "existing" in output:

Expected output:
exclamation You cannot change the memory size for an existing minikube cluster. Please first delete the cluster.
2021-04-26 11:59:17 -07:00
Medya Ghazizadeh cbe11ca8ff
Merge pull request #11003 from tklauser/x-term
Use golang.org/x/term
2021-04-25 22:56:14 -07:00
Medya Ghazizadeh d6e011bf77
Merge pull request #10918 from afbjorklund/kicbase-cache
Add code for downloading kicbase image to cache
2021-04-25 22:25:06 -07:00
Predrag Rogic e3b45667a6
improve how cni and cruntimes work together 2021-04-25 17:40:34 +01:00
Medya Ghazizadeh 41bbb4f6c5
Merge pull request #11164 from afbjorklund/build-rebase
Add re-implementation of the build command
2021-04-24 21:03:30 -07:00
Anders F Björklund 974268092f Merge branch 'master' into kicbase-cache 2021-04-24 08:36:45 +02:00
Anders F Björklund d50845903f url.Parse treats DOS volumes as URL schemes
So need to be on the lookout for "C:\\path"
2021-04-23 23:04:30 +02:00
Steven Powell 29745438da add opt-in notifications for beta releases 2021-04-22 14:35:19 -07:00
Andriy Dzikh 810f7ab108 Change 'minikube version --short' to only print the version without a prompt. 2021-04-21 19:01:55 -07:00
Anders F Björklund 943561b24d Clean up the order of the image commands 2021-04-21 20:26:28 +02:00
Anders F Björklund f7e07770c0 Clean up duplicated function etc after merge 2021-04-21 20:26:28 +02:00
Anders F Björklund 9516122d70 Add example parameters to the usage help text 2021-04-21 20:26:28 +02:00
Anders F Björklund c961190ed8 Allow passing environ and options to build 2021-04-21 20:26:28 +02:00
Anders F Björklund db203cd0e2 Allow building tarball from stdin stream 2021-04-21 20:26:28 +02:00
Anders F Björklund 9f9958f7ea Allow building image from an url as well 2021-04-21 20:26:28 +02:00
Anders F Björklund 40cbe652ea Improve comments and remove docker daemon 2021-04-21 20:26:28 +02:00
Anders F Björklund 02b4267fd0 Add option for pushing image to registry 2021-04-21 20:26:28 +02:00
Anders F Björklund c94a6d7968 Make sure to pass any file param to build 2021-04-21 20:26:28 +02:00
Anders F Björklund 6cfbf2cc3d Move minikube build cmd to minikube image build
Use the long name also for examples and usage
2021-04-21 20:26:28 +02:00
Anders F Björklund 9ef5d255d2 Add support for build directory and Dockerfile
Will create a temporary tarball, if given a dir

Some code from github.com/fsouza/go-dockerclient
(but not exported as a library, for some reason)

Upgrade docker client and cherry-pick windows

From v18.09.0 to v19.03.15, plus c3a0a37446
Update go-dockerclient and remove internal deps
2021-04-21 20:26:06 +02:00
Anders F Björklund a2744827c3 Add some basic support for setting the image tag 2021-04-21 19:56:58 +02:00
Anders F Björklund af5828dff9 Add initial re-implementation of the build command
Currently only handles tarballs, not directories
2021-04-21 19:56:55 +02:00
Tobias Klauser 112792fba0 Use golang.org/x/term
The golang.org/x/crypto/ssh/terminal package is deprecated and merely a
wrapper around golang.org/x/term. Thus, use the latter directly.
2021-04-21 12:50:48 +02:00
Anders F Björklund ef036e9297 Mock the docker call when calling it from tests 2021-04-20 22:13:26 +02:00
Medya Ghazizadeh f5035b5c28
Merge pull request #11122 from lilongfeng0902/minikube-lilf
Better to use "0777" than "0o777",instead of only in Go
2021-04-20 10:07:21 -07:00
李龙峰 84e7ea6d14 0777 better than 0o777 2021-04-20 15:04:44 +08:00
Anders F Björklund a618655bb3 Make golint clean again by adding comments 2021-04-20 08:23:26 +02:00
李龙峰 0c093da67f revert because of IDE bug 2021-04-20 08:56:17 +08:00
Medya Gh 1207de734b bump golang lint ci to latest 2021-04-19 15:16:31 -07:00
Medya Ghazizadeh d4c1c2a79f
Merge pull request #11127 from afbjorklund/image-pull
new command "image pull: allow to load remote images directly without cache
2021-04-19 14:57:48 -07:00
Anders F Björklund d8050ee03c Add documentation to the public image functions 2021-04-19 21:55:43 +02:00
Medya Ghazizadeh 19ea60f843
Merge pull request #11120 from sharifelgamal/gen-test-docs
site: Automatically generate integration test documentation
2021-04-19 12:40:40 -07:00
Anders F Björklund 9c1a4f4fc0 Allow to load remote images directly without cache 2021-04-19 20:24:06 +02:00
Anders F Björklund fbef53209a Add helper for runtime OS as well as for Arch 2021-04-18 12:51:30 +02:00
李龙峰 9cbfb9b841 filemode is not correct,0o777 to 0777 2021-04-17 10:08:28 +08:00
Sharif Elgamal 245f44da66 write to a file and move code around for clarity 2021-04-16 15:33:50 -07:00
Sharif Elgamal 1319b6e398 refactor checkRepository to make mocking easier 2021-04-14 12:51:16 -07:00
Sharif Elgamal f95c0eb709 avoid network calls for mirror unit tests 2021-04-12 15:24:46 -07:00
Anders F Björklund 0d22fe24ae Make lint happy by not using else statement 2021-04-10 16:00:00 +02:00
Anders F Björklund bc62a9f1bd Check for supported kubectl architecture too 2021-04-10 15:40:55 +02:00
Anders F Björklund 623b1a8639 Check for supported runtime architecture too 2021-04-10 15:30:17 +02:00
Anders F Björklund 1e3e8c9587 Only show the guest system, not the host system 2021-04-10 14:40:24 +02:00
Ilya Zuyev 193e4d5497 fix error message 2021-04-09 16:35:44 -07:00
Ilya Zuyev 6aa7e11923 fix imports 2021-04-08 11:50:03 -07:00
Ilya Zuyev 8d8f95305b Merge branch 'master' into ilyaz/do_not_run_amd64_on_m1 2021-04-08 11:44:52 -07:00
Ilya Zuyev b2aa1e56aa make linter happy 2021-04-08 11:14:03 -07:00
Ilya Zuyev 9a3157950f add download link 2021-04-08 10:25:12 -07:00
Medya Ghazizadeh 78288f87f3
Merge pull request #10976 from wangchenglong01/wangchl01
define a variable instead of duplicating "kube-system"
2021-04-07 18:05:27 -07:00
Ilya Zuyev d1431f67a6 exit if run amd64 binary on M1 cpu 2021-04-07 15:44:03 -07:00
Medya Ghazizadeh 40d0f5ef06
Merge pull request #11014 from afbjorklund/config-memory
Respect memory being set in the minikube config
2021-04-07 15:27:14 -07:00
Medya Ghazizadeh 848a28db5f
Merge pull request #11007 from afbjorklund/list-images
Add ListImages function and image list command
2021-04-07 15:26:22 -07:00
Anders F Björklund cc553bfb00 Fix broken unit tests encoding wrong result 2021-04-07 20:28:05 +02:00
Anders F Björklund a757877392 Add new config generation to reduce complexity 2021-04-07 20:24:08 +02:00
Anders F Björklund f672afe1d4 Fix wrong error message on memory validation 2021-04-07 20:02:46 +02:00
Anders F Björklund 25a98a2ebf Respect memory being set in the minikube config 2021-04-07 19:58:09 +02:00
Anders F Björklund 35d8d4aa52 Add ListImages function and image list command 2021-04-06 22:57:34 +02:00
Medya Ghazizadeh 18dacff70f
Merge pull request #10958 from azhao155/yzhao/feature/AddAutoPauseInitiliazedStatus
auto-pause: initialize the pause state from the current state
2021-04-05 13:46:23 -07:00
Predrag Rogic 387ad774bb
multinode: fix kindnet and dns issues 2021-04-05 16:18:37 +01:00
Cookie Wang 006adc0530 define a variable instead of duplicating "kube-system" 2021-04-02 14:32:37 +08:00
Medya Ghazizadeh 2df898a50a
Merge pull request #10968 from MadhavJivrajani/master
Avoid logging 'kubeconfig endpoint' error when cluster is 'starting'
2021-04-01 09:57:30 -07:00
Kent Iso 14cde713bd Fix unit test failing boilerplate, TestGenerateDocs 2021-04-01 21:22:05 +09:00
Madhav Jivrajani 7f1a33b6d0 avoid logging 'kubeconfig endpoint' error when cluster is 'starting'
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2021-04-01 10:24:34 +05:30
Anders F Björklund ff23ccf318 Add constant for the ISO cache directory 2021-03-30 20:19:33 +02:00
Yanshu Zhao 93dad50a94 fix lint 2021-03-30 16:27:50 +00:00
Yanshu Zhao 837ff51c4a Add initialization logic for auto-pause 2021-03-30 08:26:11 +00:00
Medya Ghazizadeh 0de446dc9e
Merge pull request #10792 from prezha/kvm-network
kvm2 driver: add dedicated network & static ip
2021-03-29 17:17:50 -07:00
Yanshu Zhao fc7195cbe5 Replace glog with klog 2021-03-29 21:58:40 +00:00
Medya Gh 5f942518f5 lint master 2021-03-29 13:42:20 -07:00
Medya Ghazizadeh 660cc42e88
Merge pull request #10823 from azhao155/yzhao/feature/auto-hook
Add auto-pause webhook to inject env into pods for redirecting in-cluster kubectl request to reverse proxy of api server.
2021-03-29 09:53:14 -07:00
Medya Ghazizadeh 29f0aec44a
Merge pull request #10920 from anencore94/cp_window
Fix to minikube cp functional test work on windows os
2021-03-29 09:33:18 -07:00
Tharun f022babe1e refractored image command removeImages function
Signed-off-by: Tharun <rajendrantharun@live.com>
2021-03-29 10:56:13 +05:30
Predrag Rogic 06d4313f3f
kvm2 driver: add static ip 2021-03-27 23:33:24 +00:00
Predrag Rogic fcc6283859
kvm2 driver: add dedicated network 2021-03-26 23:34:04 +00:00
Tharun e37f8bc1a2 add unload as an alias and fixed parent command usage
Signed-off-by: Tharun <rajendrantharun@live.com>
2021-03-27 02:30:15 +05:30
anencore94 4f9aac3aa5 Fix to minikube cp functional test work on windows os
- use filpath lib to represent local path depends on host os
- write within-minikube-path as function to represent what
 the path means
2021-03-26 15:26:03 +09:00
Tharun 82d7fcc65f address log and docs feedback
Signed-off-by: Tharun <rajendrantharun@live.com>
2021-03-25 19:32:13 +05:30
Tharun b9b657ca85 add minikube rm image command
Signed-off-by: Tharun <rajendrantharun@live.com>
2021-03-25 17:24:47 +05:30
Medya Ghazizadeh 77c6de357d
Merge pull request #10807 from afbjorklund/load-new
Image load: Allow loading local images from tar or cache
2021-03-24 17:50:03 -07:00
Tharun 628a4a8319 not mention timeToStop in status instead of showing NonExistent
Signed-off-by: Tharun <rajendrantharun@live.com>
2021-03-24 11:37:57 +05:30
Medya Ghazizadeh f567893cdb
Merge pull request #10872 from tharun208/feat/docker_env_status
add docker-env and podman-env to minikube status
2021-03-23 20:44:11 -07:00
Medya Ghazizadeh 3e869e0b7c
Merge pull request #10198 from anencore94/minikube-scp
Add minikube cp command as new feature
2021-03-23 12:43:02 -07:00
Tharun d72eea61c9 add test for docker-env status check and fix feedbacks
Signed-off-by: Tharun <rajendrantharun@live.com>
2021-03-23 23:25:38 +05:30
Tharun 2779ec021b add docker-env and podman-env to minikube status
Signed-off-by: Tharun <rajendrantharun@live.com>
2021-03-23 22:24:04 +05:30
Yanshu Zhao 14ec53f29f Fix typo 2021-03-23 15:39:04 +00:00
Anders F Björklund e35057ae7d Use accessor methods instead of just variables 2021-03-23 12:34:57 +01:00
Medya Ghazizadeh f39a3c1504
Merge pull request #10425 from bharathkkb/fix-multiple-log-files
Generate one log file per minikube command
2021-03-23 00:54:10 -07:00
Yanshu Zhao 9ea99ae129 Add skip into label object of web hook, clean up code 2021-03-23 07:03:42 +00:00
Anders F Björklund e064eb13fd Merge branch 'master' into load-new 2021-03-23 07:02:50 +01:00
Medya Ghazizadeh 18c1cc2ee0
Merge pull request #10878 from daehyeok/rootless_docker
Add solution message if Docker is rootless
2021-03-22 18:57:52 -07:00
Medya Ghazizadeh 7a47f16eec
Merge pull request #10844 from afbjorklund/kubectl-ssh
Allow running kubectl over the ssh connection
2021-03-22 18:45:45 -07:00
Anders F Björklund 1ab1eada29 Cleanup the weird-looking comment indentation 2021-03-22 20:54:47 +01:00
Anders F Björklund fd4a62f77f Make it possible to choose daemon or remote 2021-03-22 20:49:15 +01:00
Anders F Björklund e1eaeba691 Fix whitespace to make goimports happy 2021-03-22 20:43:16 +01:00
Daehyeok Mun 9b23841ee3 Add solution message if Docker is rootless 2021-03-20 13:20:30 -07:00
Anders F Björklund e7f568a9d2 Make --help work when running minikube as kubectl
Avoid the "magic" cobra.Command parsing of --help,
and pass all flags as-is to the kubectl command.

Use "minikube kubectl" if you want to set flags,
and "kubectl" if you just want to run Kubernetes.
2021-03-18 07:19:46 +01:00
Anders F Björklund c552a1e754 Make the example with --help not broken again 2021-03-17 20:22:39 +01:00
Anders F Björklund 2df5215960 Add more help text about using the ssh option 2021-03-17 20:17:56 +01:00
Yanshu Zhao 107331275c Add template for reverse proxy ip 2021-03-17 18:52:55 +00:00
Yanshu Zhao 839aacf580 polish the code 2021-03-17 08:18:36 +00:00
Yanshu Zhao 923a6247a2 fix lint 2021-03-17 02:43:48 +00:00
Anders F Björklund eea380fc0e Add example parameters to the usage help text 2021-03-16 19:36:59 +01:00
Anders F Björklund 3e4a0202cb Allow loading image from standard input stream 2021-03-16 19:35:58 +01:00
Anders F Björklund 78bc248a89 Allow running kubectl over the ssh connection
The default is to run kubernetes client locally
2021-03-16 07:45:17 +01:00
Anders F Björklund eec6f05ce0 Don't use the generic path name for a variable
It conflicts with the system "path" in module
2021-03-16 07:29:14 +01:00
Steven Powell a369264139 removed isClusterRunning check 2021-03-15 16:41:22 -07:00
Steven Powell 3e38a1954a renamed OutputMinikubeLogs to OutputOffline 2021-03-15 16:33:39 -07:00
Steven Powell eb8f7e65b9 Show last start and audit logs on `minikube logs` if minikube not running 2021-03-15 15:43:11 -07:00
Yanshu Zhao 4072ea7a93 Add header file 2021-03-15 06:37:06 +00:00
Yanshu Zhao 91f9bd6ef9 Add webhook to inject env to redirect inner cluster requests to haproxy
in auto-pause
2021-03-15 05:56:44 +00:00
Anders F Björklund ea1d023c8a Allow loading more than one image at a time
They need to all be cached or all be local, though.
If one appears to be local, then assume that all are.
2021-03-13 14:43:18 +01:00
Anders F Björklund 0d99d18803 Allow loading local images as well as from cache
Previously only allowed loading from daemon or remote
via the cache, and not directly from local tarball.
2021-03-13 14:43:15 +01:00
Medya Ghazizadeh ff0e25ada8
Merge pull request #10793 from afbjorklund/kubectl-cluster
minikube kubectl: The --cluster flags should be prepended
2021-03-12 14:18:21 -08:00
Medya Gh 67172b636c break down usage for no profile found 2021-03-12 12:29:23 -08:00
Anders F Björklund e8a35de28e The --cluster flags should be prepended
Not appended, because it will break exec
2021-03-12 08:39:41 +01:00
jjkiely e2d08bbd06 Updated more information section of validateChangedMemoryFlags function with correct, working link 2021-03-11 16:19:15 +00:00
Medya Ghazizadeh 5147ef3554
Merge pull request #10730 from sharifelgamal/auth-gce
auto-detect gce and do not enable gcp auth addon
2021-03-10 15:26:34 -08:00
Medya Ghazizadeh b3b4807ed8
Merge pull request #10760 from yxxhero/master
add validateImageRepository func for validates --image-repository args
2021-03-10 13:30:44 -08:00
Medya Ghazizadeh df7cb644af
Merge pull request #10763 from afbjorklund/silent-shell
Silent output when talking to a shell
2021-03-10 13:26:41 -08:00
yxxhero f65333730c add unittest for validateImageRepository and optimize validateImageRepository 2021-03-10 13:28:43 +08:00
Medya Ghazizadeh 05bc047dd1
Merge pull request #10732 from afbjorklund/kubectl-mustload
The cluster doesn't have to be healthy for kubectl
2021-03-09 16:46:03 -08:00
Medya Ghazizadeh 5beacff48f
Merge pull request #10734 from afbjorklund/kubectl-crash
Need to exit if unable to cache kubectl
2021-03-09 16:45:26 -08:00
Sharif Elgamal a3544ae90a create detect package 2021-03-09 15:11:54 -08:00
Sharif Elgamal 15c44bf7ac reorganize addons to make force flag more generic 2021-03-09 13:32:09 -08:00
Anders F Björklund 5e566d3039 Silent output when talking to a shell
If the output is not a terminal, then assume that we are running
docker-env or podman-env under "eval" or similar shell construct.

So don't output all the interactive information, but only return
the actual exit code for some further troubleshooting (perhaps).
2021-03-09 17:59:26 +01:00
yxxhero 416f92a8b5 add validateImageRepository func for validates --image-repository args 2021-03-09 13:47:36 +08:00