Commit Graph

242 Commits (670bc12c823f8b9241dd407a5840903c65df274b)

Author SHA1 Message Date
Sharif Elgamal b71728b27f fix syntax 2021-02-10 12:16:06 -08:00
Sharif Elgamal adf6f91ee3 Merge branch 'master' of github.com:kubernetes/minikube into ingress-none 2021-02-10 11:42:21 -08:00
Kent Iso b1030dc28a Fix configuration of the metallb with empty load balancing IP range 2021-02-07 23:43:05 +09:00
Ling Samuel b949034e1a
Manage addon images in code, support custom addon images
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
2021-01-27 10:33:00 +08:00
Daehyeok Mun 36d94a2d88 Migrate MachineName function.
Migrate MachineName function from driver package to config package.
2021-01-08 11:26:10 -08:00
Jituri, Pranav 0ae11fd5c8
fix linting error 2020-12-15 18:22:36 +05:30
Sharif Elgamal ad330b21ad Merge branch 'master' of github.com:kubernetes/minikube into ingress-none 2020-12-09 11:12:23 -08:00
Jituri, Pranav 6bbc5f986b
Enable Ingress Addon for Docker Windows 2020-11-21 16:01:06 +05:30
Sharif Elgamal bef7a2a2b7 Merge branch 'master' of github.com:kubernetes/minikube into ingress-none 2020-11-13 09:55:13 -08:00
Evgeny Shmarnev f88040aad9
Merge branch 'master' into ISSUE-9664 2020-11-12 13:47:12 +01:00
Evgeny Shmarnev db93039f9c Addressing comments 2020-11-12 13:45:33 +01:00
Sharif Elgamal c01e106b48 better comment 2020-11-11 13:37:40 -08:00
Sharif Elgamal b23cb6c20d find special cloud shell spot for creds 2020-11-11 12:26:50 -08:00
Sharif Elgamal 4f4124c69d try to create credentials file if using env to authenticate 2020-11-10 15:53:54 -08:00
Sharif Elgamal cda2d13d21 Turn on ingress addon on linux baremetal 2020-10-28 12:19:26 -07:00
zouyu 3130c9fce0 Add unit test
Signed-off-by: zouyu <zouy.fnst@cn.fujitsu.com>
2020-10-23 10:13:38 +08:00
Thomas Stromberg e2fdc077f8 Use 6 minutes, to use the philosophy of doubling timeouts you hit 2020-10-21 09:54:01 -07:00
Thomas Stromberg 20d1645ce7 Wait up to 5 minutes for addon pods, improve error message 2020-10-21 09:44:39 -07:00
Priya Modali 8936a8c7f8 Merge branch 'master' of https://github.com/kubernetes/minikube into klog 2020-10-13 09:08:27 -07:00
Sharif Elgamal b04610ef9b simplify addon code by fixing gcp-auth failure policy 2020-10-06 16:14:44 -07:00
Priya Modali 43ea47f4e0 Fixed merge conflicts. 2020-09-29 16:17:31 -07:00
Priya Modali 97d96bf925 Switching from glob library to klog library. 2020-09-29 15:49:41 -07:00
Sharif Elgamal ff051f9a33
Make sure gcp-auth addon can be enabled on startup (#9318)
* fix documentation for gcp-auth addon

* make sure kube-system pods are up before enabling gcp-auth

* fix lint

* add failurePolicy for webhook

* only install addons if asked

* better comment

* slightly less hacky code

* defer addons properly

* simplify code for performance
2020-09-29 13:29:14 -07:00
jjanik ae92c289b8 add csi-hostpath-driver addon 2020-09-04 18:54:33 +02:00
jjanik c5ae7b9580 add volumesnapshots addon 2020-09-04 17:10:54 +02:00
Sharif Elgamal ed4271ffbc trim whitespace when setting gcp project id 2020-09-02 11:42:47 -07:00
Thomas Strömberg 3fbbb557b1
Merge pull request #9032 from zhijianli88/cleanup-tempfiles2
Cleanup tempfiles2
2020-09-01 16:25:00 -07:00
Thomas Strömberg fba4de74cf
Merge pull request #8787 from saltbo/master
fix error usage for the WaitGroup in the pkg addons
2020-09-01 16:21:51 -07:00
Thomas Stromberg 2c5e8fdaee Add detailed JSON & status codes for all error paths 2020-08-30 17:25:11 -07:00
Li Zhijian 95e7203900 add a temp MinikubeHome for TestStart
this test will write a config.json into MinikubeHome, create a temp dir for it

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2020-08-20 11:49:07 +08:00
Li Zhijian 50459e0566 add testing cleanup hook for createTestProfile
T.cleanup() is introduced since go-1.14

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2020-08-19 18:10:07 +08:00
Medya Ghazizadeh a13e5e5512
Merge pull request #8870 from Dean-Coakley/add-ingress-noneDriver-warn
Add warning for ingress addon enabled with driver of none
2020-08-10 13:17:54 -07:00
Sharif Elgamal 02930c0d51 fix tip output and do not output ending tip disabling 2020-08-06 13:45:46 -07:00
Sharif Elgamal 16ba55d05f better error message 2020-08-06 12:36:54 -07:00
Sharif Elgamal 90dadd0ce6 better error messages for not finding creds 2020-08-06 11:47:09 -07:00
Dean Coakley 9c23485dfb Remove list of alternative drivers 2020-07-29 09:40:43 +01:00
Dean Coakley 4b2974472d Improve error message text 2020-07-28 22:40:55 +01:00
Dean Coakley b27440d4ae Add warning for ingress addon with driver of none 2020-07-28 22:40:15 +01:00
Medya Ghazizadeh 85f1c4f2dd
Merge pull request #8792 from concaf/concaf/fix/fix-already-started
(Addons) Create a new command in every retry
2020-07-21 14:43:14 -07:00
Sharif Elgamal 1b6eee675b
Automated GCP Credentials Addon Prototype (#8682)
* metadata addon works

* Add code for metadata server image and makefile rules

* remove log message

* update to work with v1.13.11

* update readme

* fix metadata addon stuff for newer codebase

* buncha changes

* just so many changes

* ch-ch-ch-ch-changes

* addon works

* update readme

* boilerplate

* revert unrelated change

* move server code to another repo

* switch addon name to gcp-auth

* metadata -> gcp-auth

* missed one

* automate finding of credentials

* remove unnecessary comment

* address comments

* Update README.md

* Update README.md

* use mustload everywhere

* swap selector condition

* upgrade kube-webhook-certgen to 1.3

* move paths to constants

* add notice to user on addon enable

* adding addon documentation

* move addons documentation inside handbook

* remove old addons docs location

Co-authored-by: Priya Wadhwa <priyawadhwa@google.com>
2020-07-21 14:25:58 -07:00
Shubham f42f79e56d (Addons) Create a new command in every retry
Whenever a `kubectl apply` fails while enabling an addon, it is
retried with exponential backoff. The command (type `*exec.Cmd`)
that this retry function runs in created outside the function -
which means that it is reused on every retry. This is a problem
because `exec.Cmd` (https://godoc.org/github.com/pkg/exec#Cmd)
states that "... Cmd cannot be reused after calling its Run or
Start methods."

This retry is a common case due to, say, a CRD and its resource
being present in the same YAML file of the addon which causes
a race condition where the resource is created before its CRD is
created in the cluster - this race is fixed by subsequent retries.
I've noticed this in the dashboard and the ambassador addon.

Due to the above mentioned bug, minikube throws errors like
`exec: already started` in every retry and the retry is never
successful, manifests are never deployed and addon creation errors
out.

Related to #8138 #8119 #8372
2020-07-21 21:20:24 +05:30
Ambor e00cf6c1e1 fix error usage for the WaitGroup in the pkg addons 2020-07-21 11:57:06 +08:00
Priya Wadhwa 3a290606db Merge branch 'master' of https://github.com/kubernetes/minikube into json-output 2020-07-10 19:12:50 -04:00
Medya Ghazizadeh d8106f7d06
Merge pull request #8454 from colvin/addon-podsecuritypolicies
Include a podsecuritypolicies addon
2020-07-07 15:52:03 -07:00
Priya Wadhwa bd94872a10 add additional steps 2020-07-07 14:25:27 -04:00
Medya Gh e829341b9d improve logging 2020-06-26 15:12:15 -07:00
Medya Gh 64553e281b revert debugging 2020-06-26 15:11:03 -07:00
Medya Gh 742dcd6b00 add addon status verification for 3 addons 2020-06-26 15:08:38 -07:00
Medya Gh 66421a6492 wait for ingress pod be running 2020-06-26 14:22:17 -07:00
Medya Gh 52f4e130b5 lint 2020-06-26 13:20:31 -07:00
Medya Gh 5fbf197b18 remove unrelated changes 2020-06-26 13:20:31 -07:00
Medya Gh 96781c61a2 remove unrelated changes 2020-06-26 13:20:30 -07:00
Medya Gh 058a732909 ingress addon validate deployment after enable 2020-06-26 13:20:30 -07:00
Medya Gh c47854b8fd add validate ingress 2020-06-26 13:20:30 -07:00
Medya Gh a0c33f82c1 ingress addon wait for it 2020-06-26 13:20:30 -07:00
Priya Wadhwa 1b8eaaf76c Move kubectl binary function to kapi package to prevent future cyclic import dependencies 2020-06-25 09:40:14 -07:00
Priya Wadhwa 6d3a0c4eca Reduce coredns replicas from 2 to 1
This is an easy way to improve overhead, and users can always scale this back up if they need to.
2020-06-24 17:42:12 -07:00
colvin 3d2ae5423c Rename podsecuritypolicies addon to pod-security-policy 2020-06-18 17:00:08 -04:00
Kenta Iso ab58dca23d replace to metrics-server in case of `minikube start --addons heapster` 2020-06-13 01:07:16 +09:00
Kenta Iso 803461ddcf if the specified addon doesn't exist, skip enabling 2020-06-13 00:46:12 +09:00
Kenta Iso 9d71fc635b remove unneccesary config 2020-06-13 00:46:12 +09:00
Kenta Iso d76b58c3ae Add heapster alias to metrics-server addon 2020-06-13 00:46:12 +09:00
colvin b32cb5e6ba Create a podsecuritypolicies addon
Create a new addon, `podsecuritypolicies` that applies the
PodSecurityPolicy and related RBAC configuration from the
https://minikube.sigs.k8s.io/docs/tutorials/using_psp/ tutorial.
Apparently, recent work on the addons system has invalidated the
procedure shown in that tutorial, as the configuration is no longer
automatically applied. The last known working version is `1.6.2`.

This allows clusters started with
`--extra-configs=apiserver.enable-admission-plugins=PodSecurityPolicy`
to succeed, so long as they also include `--addons=podsecuritypolicies`.
2020-06-11 09:51:13 -04:00
gashirar a85b5aa984 fix logviewer config. 2020-06-05 04:55:18 -07:00
Medya Ghazizadeh 4eb09e760b
Merge pull request #8275 from ashleyschuett/add-kubevirt-addon
Add KubeVirt addon
2020-06-03 22:23:09 +00:00
Ashley Schuett 5dafe6bc84
Add KubeVirt addon 2020-05-29 09:52:18 +02:00
Medya Ghazizadeh ea20609a3a
Merge pull request #8161 from concaf/concaf/addons/ambassador
Add Ambassador Ingress controller as an addon
2020-05-28 18:08:41 +00:00
Shubham 4a4a470fff Add Ambassador addon 2020-05-19 18:13:57 +05:30
Natale Vinto b6c19f6223 Addons: add OLM support 2020-05-14 11:16:23 +02:00
Thomas Stromberg 6969200dd7 addons: fix initial retry delay, double maximum limit 2020-05-04 12:44:30 -07:00
Thomas Strömberg e3a3b1e743
Merge pull request #7308 from laozc/metallb
Add Metal LB addon
2020-04-24 16:59:50 -07:00
Medya Ghazizadeh 825ba532d1
Merge pull request #7603 from alonyb/w/add-registery-addon
Add registry addon feature for docker on mac/windows
2020-04-17 19:50:43 -07:00
Medya Ghazizadeh fe4fdeec6c
Merge pull request #7752 from medyagh/node_pressure_redo
Check node pressure & new option "node_ready" for --wait flag
2020-04-17 19:45:40 -07:00
Medya Gh 4e7429695d address review comments 2020-04-17 14:07:41 -07:00
Thomas Stromberg 3a5406f79e Unify client creation around kapi.Client 2020-04-17 09:58:14 -07:00
Alonyb bfa45ef79a delete unnecesary func 2020-04-16 19:49:26 -05:00
Medya Gh bb327e250d adjust try 2020-04-16 15:14:59 -07:00
Medya Gh 0687e2adc0 defer print addon 2020-04-16 13:39:59 -07:00
Medya Gh a023de61a7 defer printing enabling addons 2020-04-16 13:38:17 -07:00
Alonyb 62904e5dcc fix lint 2020-04-15 09:30:10 -05:00
Alonyb 338e61bd21 change output message icon 2020-04-11 13:31:51 -05:00
Alonyb 4f86c3e5c8 some adjustments 2020-04-11 00:56:34 -05:00
Alonyb 3bd143037b change output message 2020-04-10 18:49:54 -05:00
Alonyb 428d9ee911 add new addon 2020-04-10 14:45:43 -05:00
Thomas Strömberg bab824a830
Merge pull request #7559 from tstromberg/cert-err2
make CommandRunner.Copy/Remove consistent across runners
2020-04-09 17:31:37 -07:00
Thomas Stromberg bf784d8bf3 Refactor CommandRunner.Copy functions for consistency 2020-04-09 13:24:14 -07:00
Thomas Stromberg 38843d97b4 Update SetAndSave argument order 2020-04-08 21:27:38 -07:00
Thomas Stromberg 1e8801ceb8 Make addons.Start thread-safe 2020-04-08 21:23:35 -07:00
Thomas Stromberg 93e6eee2e3 Pass correct variable in 2020-04-08 15:20:30 -07:00
Thomas Stromberg 22882089af Address code review comments 2020-04-08 15:17:14 -07:00
Thomas Stromberg 5ce7b4b147 Parallelize post-cluster steps 2020-04-08 12:29:23 -07:00
Medya Gh 3f16f27540 less tab 2020-04-02 17:20:25 -07:00
Medya Gh 9fd6496743 improve messge 2020-04-02 17:19:45 -07:00
Medya Gh 77d2b50087 break down the lines 2020-04-02 17:16:00 -07:00
Medya Gh db00506d67 dont allow enabling ingress addon for docker on mac and windows 2020-04-02 17:00:06 -07:00
Zhongcheng Lao 9adb1bc399
Merge remote-tracking branch 'origin/master' into metallb 2020-03-29 11:31:56 +08:00
Zhongcheng Lao d9fe5afa86
Adds MetalLB addon 2020-03-29 11:20:59 +08:00
Thomas Stromberg ea9aa72984 Retry addon application 2020-03-25 13:44:28 -07:00
Thomas Strömberg 8d1f4552c0
Merge pull request #6657 from kameshsampath/registry-aliases
New addon: registry-aliases
2020-03-19 11:31:00 -07:00
Thomas Stromberg 196a8d7b82 Delete: output underlying status failure, refactor wordy code 2020-03-13 15:51:03 -07:00
Thomas Stromberg c911b9f433 UsingContainerd -> IsRuntimeContainerd 2020-03-10 19:27:49 -07:00
Thomas Stromberg 176c6551a8 IsContainerdRuntime -> IsRuntimeContainerd 2020-03-10 19:08:27 -07:00
Thomas Stromberg bd627f13e4 Plumb config.ClusterConfig throughout addon validation code 2020-03-10 17:49:47 -07:00
Sharif Elgamal 424b5170f7
Allow backwards compatibility with 1.6 and earlier configs 2020-03-09 12:01:07 -07:00
Kamesh Sampath 70ca2de554 (fix) Create addon to configure registry helper
- Service Account and binding to run the job
- Registry aliases ConfigMap
- Registry aliases daemonset to update the node etc/hosts

fixes: 4604

Signed-off-by: Kamesh Sampath <ksampath@redhat.com>
2020-03-08 09:31:07 +05:30
Sharif Elgamal 3bb111a6fc
make sure machine name is properly backwards compatible 2020-03-03 13:49:01 -08:00
Sharif Elgamal 28e030c728
Merge branch 'master' of github.com:kubernetes/minikube into machinename 2020-03-03 12:16:47 -08:00
Sharif Elgamal 31a42ce672
address comments 2020-03-02 17:30:08 -08:00
Sharif Elgamal 4b902f7e9f
more changes 2020-02-28 15:58:05 -08:00
Song Shukun 884c30a5f6 Fix: disable a disabled addon cause error 2020-02-27 19:21:08 +09:00
Sharif Elgamal 6e9cf2de2f Change MachineConfig to ClusterConfig 2020-02-21 16:09:05 -08:00
Sharif Elgamal 2785d292f5 Merge branch 'master' of github.com:kubernetes/minikube into node-pkg 2020-02-13 10:15:04 -08:00
Sharif Elgamal 8c55c9ca60 holy crap cyclical import hell sucks 2020-02-12 18:34:44 -08:00
Medya Ghazizadeh 398c7ef00b
Add podman driver (#6515) 2020-02-12 19:11:44 -07:00
Thomas Strömberg 950fc79544
Merge pull request #6512 from tstromberg/gvisor-fixes
gvisor fixes for v1.7.0
2020-02-05 15:37:05 -08:00
tstromberg 77f74d82d7 Remove unused files var 2020-02-05 14:53:02 -08:00
tstromberg d66bcad56c Only run kubectl apply on YAML files 2020-02-05 14:41:05 -08:00
Vijay Katam cf8e247ae3 Use cluster-dns IP setup by kubeadm
Removed hardcoded `cluster-dns` IP 10.96.0.10, this allows kubelet to use `clusterDNS` configured by kubeadm in `/var/lib/kubelet/config.yaml`

Tested by starting minikube with `--service-cluster-ip-range=100.64.0.0/13` and verifying DNS resolution works.

/etc/systemd/system/kubelet.service.d/10-kubeadm.conf
```
[Unit]
Wants=docker.socket

[Service]
ExecStart=
ExecStart=/var/lib/minikube/binaries/v1.17.0/kubelet --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver='cgroupfs' --client-ca-file=/v
ar/lib/minikube/certs/ca.crt --cluster-domain=cluster.local --config=/var/lib/kubelet/config.yaml --container-runtime=docker --fail-swap-on=false --hostname-override=minikube --kubeconfig=/e
tc/kubernetes/kubelet.conf --node-ip=192.168.64.7 --pod-manifest-path=/etc/kubernetes/manifests

[Install]
```

DNS resolution test
```
kubectl run -i --tty --rm busybox --image=busybox --restart=Never -- sh
If you don't see a command prompt, try pressing enter.
/ # nslookup kubernetes.io
Server:		100.64.0.10
Address:	100.64.0.10:53

Non-authoritative answer:
Name:	kubernetes.io
Address: 147.75.40.148
```

Fixes: https://github.com/kubernetes/minikube/issues/5727

fix lint errors
2020-02-05 10:28:16 -08:00
tstromberg 2eddd08ae9 Fix test signature 2020-02-03 12:57:52 -08:00
tstromberg bcc186b908 Startup previously enabled addons 2020-02-03 10:49:40 -08:00
Thomas Stromberg c3aafaeeb4 Add IsNotExist() method to the config package, so that we can have meaningful error messages and make them comparable 2020-01-31 14:19:08 -08:00
Thomas Stromberg a7ac0339fd Address eview feedback 2020-01-31 13:24:30 -08:00
Thomas Stromberg 78ed12265d Add testing for Start function, make addon enablement testable 2020-01-31 12:19:25 -08:00
tstromberg b97124207c Move addon enablement to addons module + lint fixes 2020-01-30 17:46:25 -08:00
tstromberg d5a83c7b24 Add addon enablement to start 2020-01-30 15:54:04 -08:00
Priya Wadhwa 8d8ea98378 check cmd.Remove error for linting 2020-01-22 15:11:33 -08:00
Priya Wadhwa 15a5209841 Update unit tests 2020-01-22 14:23:32 -08:00
Priya Wadhwa 7247a7dee6 Switched to using kubectl apply and kubectl delete for addons
kubectl apply with --prune wasn't working because it requires the
--namespace flag to be passed in and we have multiple namespaces for
addons.

We tried to split up addons within /etc/kubernetes/addons by
namespace, but this didn't work when disabling dashboard addon because
there were no files left in the kubernetes-dashboard subdirectory. So,
kubectl apply complained when trying to prune dashboard because no files
were being passed in.

So, I ended up removing all dependencies on prune and instead running
`kubectl apply` when enabling an addon and running `kubectl delete` when
disabling an addon.
2020-01-22 14:18:20 -08:00
Priya Wadhwa de4ecb9706 Rebased on master 2020-01-22 13:10:50 -08:00
Priya Wadhwa 180b23f2c8 Save addons in subdirectories, separated by namespace
This way we can pass the correct --namespace flag into 'kubectl apply'
such that it works with '--prune' for kubectl >=v.17.0
2020-01-22 13:09:37 -08:00
Priya Wadhwa 28148c5f3d Remove addon manager 2020-01-16 11:47:01 -08:00
Priya Wadhwa f5be457399 fix unit tests 2020-01-14 12:12:47 -08:00
Priya Wadhwa 9a2de2ae7f Hook up new addon manager logic to existing addons code 2020-01-14 10:52:27 -08:00
Anders F Björklund d265162fe2 Fix some minor issues from gofmt and golint 2020-01-13 21:38:59 +01:00
Priya Wadhwa 6ad7e4a9a0 address code review comments
add better error handling and remove duplication in enableOrDisableAddonsInternal
2020-01-06 13:42:09 -08:00
Priya Wadhwa e47cde6ae4 Rebased on master, moved istio addon into new package 2019-12-30 10:10:05 -05:00
Priya Wadhwa 4c7b94971c Address review comments
Remove old TODO and remove function to get current profile as it can
create errors when trying to get multiple profiles.
2019-12-19 10:41:01 -08:00
Priya Wadhwa 43a7267079 make public methods that aren't used outside of the package private 2019-12-18 22:33:00 -08:00
Priya Wadhwa ceb4938c7a Add more unit tests 2019-12-18 22:27:32 -08:00
Priya Wadhwa 921fee7432 Moved unit tests to addons package and refactored them 2019-12-18 22:02:10 -08:00
Priya Wadhwa e72cb80cbf Enable/disable addons works per profile
However, this means that addon information won't persist beyond a 'minikube delete'
2019-12-18 21:35:46 -08:00
Priya Wadhwa ba8b723978 Move addon related logic to pkg/addons for better organization 2019-12-18 11:31:29 -08:00