Commit Graph

209 Commits

Author SHA1 Message Date
Hector Fernandez
d3f13cc6ff providers: fix string format (#575) 2019-04-19 08:10:03 -07:00
Hongbin Lu
2521ec1cce Add documentation for OpenStack provider (#570)
* Add documentation for OpenStack provider

Signed-off-by: Hongbin Lu <hongbin034@gmail.com>

* Add maintainer for OpenStack provider

Signed-off-by: Hongbin Lu <hongbin034@gmail.com>
2019-04-08 14:31:39 -07:00
Anubhav Mishra
455b0cc4a6 Adding HashiCorp Nomad homepage links (#567)
* Add nomad link to readme.
2019-04-03 23:08:26 -07:00
Yash Desai
750de3195d Resource manager: add service lister and remove unused lock. (#559)
* Remove unused lock from the resource manager.

* Add service lister to the resource manager.

This change adds a service lister in the
resource manager.
This will be used to set the service env vars.
Also added a List method to the resource manager
and a simple test to confirm it's a pass through.
2019-04-03 11:19:30 -07:00
Vipin Duleb
bab9c59ac8 GPU support in ACI provider (#563)
* GPU support in ACI provider
2019-04-02 18:11:35 -07:00
Brian Goff
1942522cf6 Add async provider pod status updates (#493)
This adds a new interface that a provider can implement which enables
async notifications of pod status changes rather than the existing loop
which goes through every pod in k8s and checks the status in the
provider.
In practice this should be significantly more efficient since we are not
constantly listing all pods and then looking up the status in the
provider.

For providers that do not support this interface, the old method is
still used to sync state from the provider.

This commit does not update any of the providers to support this
interface.
2019-04-01 09:07:26 -07:00
Kevin Zhao
5afb24809d Add OpenStack Zun provider(#22) (#239)
* Add Virtual Kubelet provider for OpenStack Zun

Initial virtual kubelet provider for OpenStack Zun. This provider
currently handles creating, starting and deleting a pod via OpenStack
Zun. Currently the configmap and secret is not support in Zun. Currently
the Volume is supported in Zun and will implementation the support in
virtual kubelet in next several patches.

Will add document to elaborate this development status.

Change-Id: Id80f18d89b22c535214aef95254f5c3c7ae23139
Signed-off-by: Kevin Zhao <kevin.zhao@arm.com>

* trying to fix dependencies

Change-Id: I8e6f2e0234a11591ff2be74e22dca1fb91bf8f47
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

* Add dummy ExecInContainer method

Change-Id: Idece5695bd81b0911538660526484895cdd8832c
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

* better use of fmt.Errorf

Change-Id: Ic402c80bd2302ac4f26b0025f110cbf9977ca862
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

* fix gofmt error

Signed-off-by: Kevin Zhao <kevinzs2048@gmail.com>

* add gophercloud vendor

Signed-off-by: Kevin Zhao <kevinzs2048@gmail.com>

* add provider register for openstack

Signed-off-by: Kevin Zhao <kevinzs2048@gmail.com>

* fix build error

Signed-off-by: Kevin Zhao <kevinzs2048@gmail.com>

* excluded aci test case

Signed-off-by: Kevin Zhao <kevinzs2048@gmail.com>

* Zun: several fixes on openstack provider

* Remove 'zunCapStatusToPodPhase' since it is not used anymore.
* Remove the handling of first container in capsule.
* Remove 'ApiVersion' from CapsuleTemplate

Signed-off-by: Hongbin Lu <hongbin034@gmail.com>

* Update gophercloud to latest

* Zun: use Zun API micro version 1.32

Signed-off-by: Hongbin Lu <hongbin034@gmail.com>

* Zun: wait for capsule to be deleted

Resource deletion in OpenStack Zun is asynchronous which means
the resource is not deleted immediately right after the delete request.
This commit make the provider wait for resource deletion to complete
on DeletePod.

Signed-off-by: Hongbin Lu <hongbin034@gmail.com>

* Change the build tag to openstack_provider

Signed-off-by: Hongbin Lu <hongbin034@gmail.com>
2019-03-28 18:27:57 -07:00
Brian Goff
947b530f1e Replace testify with gotest.tools (#553)
* vendor gotest.tools

* Run gotest.tools migration tools

* Fixup tests that were improperly converted

* Remove unused testify package vendors
2019-03-28 17:08:12 -07:00
Brian Goff
bf420eac41 Remove sfmesh provider (#550)
This is not being supported and as such it was requested (internally) to
be removed.
2019-03-28 09:01:06 -07:00
Sravan Rengarajan
ecc46e6c7d ACI readme updates 2 2019-03-27 12:25:57 -07:00
Sravan Rengarajan
eb040b1b1d ACI readme updates 2019-03-27 12:23:09 -07:00
Brian Goff
10430f0b7f Add node provider interfaace (#526)
This starts the work of having a `NodeProvider` which is responsible for
providing node details.
It splits the responsibilities of node management off to a new
controller.

The primary change here is to add the framework pieces for node
management and move the VK CLI to use this new controller.

It also adds support for node leases where available. This can be
enabled via the command line (disabled by default), but may fall back if
we find that leaess aren't supported on the cluster.
2019-03-25 15:02:40 -07:00
Zhengyi Lai
c898aefdcb Fix typo (#539)
Signed-off-by: Zhengyi Lai <zheng1@yunify.com>
2019-03-19 11:48:41 -07:00
Brian Goff
f8c51004d4 Support building an allow-list of providers (#527)
* Add providers subcommand to verify providers

Allows users to check what providers are available

* Fix version output to add new line

This command was totally broken until we moved around the call to
`initConfig()`, this just fixes the output now that it works.

* Flip boolean of provider include tags

All providers are still included by default and fix tags using the old
format.
2019-03-02 11:25:47 -08:00
Pires
a5d7400232 providers: remove hypersh provider (#524)
Hyper.sh was shutdown on Jan 16, 2019.
https://blog.hyper.sh/close_hyper_sh.html

Signed-off-by: Paulo Pires <pjpires@gmail.com>
2019-02-28 15:04:13 -08:00
Brian Goff
d19e8e5e27 Move aci client (#531)
* Add azure-aci client dep

* Use aci client from new repo
2019-02-25 17:15:25 -08:00
Brian Goff
1bfffa975e Make tracing interface to coalesce logging/tracing (#519)
* Define and use an interface for logging.

This allows alternative implementations to use whatever logging package
they want.

Currently the interface just mimicks what logrus already implements,
with minor modifications to not rely on logrus itself. I think the
interface is pretty solid in terms of logging implementations being able
to do what they need to.

* Make tracing interface to coalesce logging/tracing

Allows us to share data between the tracer and the logger so we can
simplify log/trace handling wher we generally want data to go both
places.
2019-02-22 11:36:03 -08:00
Ria Bhatia
4f3bd20e15 ACI docs & limitations (#502)
* adding limitations

* edits -1

* formatting

* making the docs usable :)
2019-01-15 13:05:30 -08:00
Robbie Zhang
b44d5b9f22 Add the new ACI regions (#487) 2019-01-07 16:22:53 -08:00
Anubhav Mishra
a46e1dd2ce Add HashiCorp Nomad provider (#483)
* provider: adding Nomad provider

* updating CONTRIBUTING.md with Nomad provider

* updated README.md by adding the Nomad provider

* fix typo

* adding nomad/api and nomad/testutil deps

* adding Nomad binary dependency for provider tests

* fixed the nomad binary download command step and added tolerations to the nomad provider.

* adding nomad provider demo gif

* adding my name to authors

* adding two missing go-rootcerts files after dep ensure

* delete pod comment
2019-01-07 11:48:11 -08:00
Robbie Zhang
f7afeba12e Remove the Restriction that No NSG should be set on the Subnet (#478) 2018-12-27 16:35:38 -08:00
Yue Zhang
d456ef816f fix: fix dead link (#480)
Signed-off-by: zhangyue <zy675793960@yeah.net>
2018-12-27 10:40:17 -08:00
muya-zj
e5c3d0104c [AlibabaCloud] Change alicloud to alibabacloud (#470) 2018-12-26 06:42:56 -08:00
shidao-ytt
966f7a807b remove cpu mem limits of container (#429) 2018-12-21 13:38:41 -08:00
Ria Bhatia
a4c73dd03a adding virtual node docs (#454) 2018-12-14 13:40:05 -08:00
Bruno Miguel Custodio
34b356ee5f mock: do not panic on unknown pods
Signed-off-by: Bruno Miguel Custodio <brunomcustodio@gmail.com>
2018-12-12 12:07:45 +00:00
Paulo Pires
28a757f4da use shared informers and workqueue (#425)
* vendor: add vendored code

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* controller: use shared informers and a work queue

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* errors: use cpuguy83/strongerrors

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* aci: fix test that uses resource manager

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* readme: clarify skaffold run before e2e

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* cmd: use root context everywhere

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: refactor pod lifecycle management

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* e2e: fix race in test when observing deletions

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* e2e: test pod forced deletion

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* cmd: fix root context potential leak

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: rename metaKey

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: remove calls to HandleError

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* Revert "errors: use cpuguy83/strongerrors"

This reverts commit f031fc6d.

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* manager: remove redundant lister constraint

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: rename the pod event recorder

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: amend misleading comment

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* mock: add tracing

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: add tracing

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* test: observe timeouts

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* trace: remove unnecessary comments

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: limit concurrency in deleteDanglingPods

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: never store context, always pass in calls

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: remove HandleCrash and just panic

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: don't sync succeeded pods

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* sync: ensure pod deletion from kubernetes

Signed-off-by: Paulo Pires <pjpires@gmail.com>
2018-11-30 15:53:58 -08:00
Paulo Pires
0e9cfca585 ci: move go vet to validate check (#430)
* ci: move go vet to validate check

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* cri: don't build when not on linux

Signed-off-by: Paulo Pires <pjpires@gmail.com>
2018-11-30 13:58:55 -08:00
Robbie Zhang
338a7c2213 [ACI] Fallback to parse authConfig.Auth when Username field is not specified (#421)
* Fallback to parse authConfig.Auth when Username field is not specified
2018-11-28 11:33:07 -08:00
Robbie Zhang
30f9c8cf23 Add MasterURI setting in the README.md
Add MasterURI setting in the README.md
2018-11-28 10:44:06 -08:00
Paulo Pires
579823e6a5 tests: introduce e2e suite (#422)
* mock: implement GetStatsSummary

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* make: use skaffold to deploy vk

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* test: add an e2e test suite

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* test: add vendored code

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* docs: update README.md

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* ci: run e2e on circleci

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* make: improve the skaffold target

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* e2e: fix defer pod deletion

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* e2e: improve instructions

Signed-off-by: Paulo Pires <pjpires@gmail.com>

* makefile: default shell is bash

Signed-off-by: Paulo Pires <pjpires@gmail.com>
2018-11-28 09:01:36 -08:00
shidao-ytt
688c10fa8b [AliCloud] Add cluster name and bug fix (#412)
* [AliCloud] add tag ClusterName for different k8s cluster

* [AliCloud] BugFix: vk get wrong pod ip

* update serverless kubernetes help doc link
2018-11-26 11:08:37 -08:00
Robbie Zhang
f07daf494b BugFix: secret data missing tail newline (#406) 2018-11-26 11:01:00 -08:00
Brian Goff
cd42fdd7b8 Use strongerrors in provider implementations. (#403)
This ensures that we can catch certain types of errors from providers
and handle accordingly in the core. There is still more to do here to
improve that but this resolves an immediate need to know why a Delete
failed.

vic provider was not updated since I could not figure out where to get
this information.
2018-11-07 16:02:48 -08:00
Carlos Mendible
4edd39a8ef Fixed typo on helm install sample (#392)
Fixed typo on helm install sample. Replaced providers.azure.clientID with provider.azure.clientId so the values are correctly parsed.
2018-11-02 15:04:50 +00:00
shidao-ytt
77c3315da4 [AliCloud] Add init container (#382)
* clean up eci sdk code

remove unnecessary code

* add init containers support
2018-11-01 15:57:30 -07:00
Ria Bhatia
a9ff4fed4a adding vnet documentation changes (#354)
* adding vnet changes

* format error

* change

* add exec

* added sp instructions

*  adding output

* adding link

* name change

* node selector change

*  plz be the last change

* vnet changes

* vnet changes, took out sp variables

* Adding more changes

* aci subnet

* added master uri

* fixed stuff

* adding master uri again

* add /
2018-10-30 23:43:17 +00:00
Brian Goff
4b6f79111f Typo in build tag for alicloud provider
It's what I do...
2018-10-19 12:22:25 -07:00
Robbie Zhang
5991b29f76 [ACI] Support to add extra user agent to the request (#378)
* Add UserAgent

* Change to join the user agent with a whitespace and set in the header

* Remove empty entry from user agent
2018-10-18 14:28:43 -07:00
Robbie Zhang
4a7b74ed42 [VK] Use Cache controller and Make create/delete pod Concurrently (#373)
* Add k8s.io/client-go/tools/cache package

* Add cache controller

* Add pod creator and terminator

* Pod Synchronizer

* Clean up

* Add back reconcile

* Remove unnecessary space in log

* Incorprate feedbacks

* dep ensure

* Fix the syntax error

* Fix the merge errors

* Minor Refactor

* Set status

* Pass context together with the pod to the pod channel

* Change to use flag to specify the number of pod sync workers

* Remove the unused const

* Use Stable PROD Region WestUS in Test

EastUS2EUAP is not reliable
2018-10-16 17:20:02 -07:00
robbiezhang
10cf53cc9c Use a hash of the subnetID instead of virtual node name to avoid conflict 2018-10-16 20:31:39 +00:00
robbiezhang
c193fbe3c0 Remove the validation on the Subnet IP Configuration Profile
NRP used to add a profile entry when a service association link is added to the subnet

Now, the profile entry is added when a network profile is created

This breaks the current validation
2018-10-16 19:52:23 +00:00
robbiezhang
eb77d5686f Update the network sdk and add more validations 2018-10-13 00:16:19 +00:00
Brian Goff
d710e0391c Merge pull request #369 from robbiezhang/master
Update kubernetes projects version in vendor to 1.12.1
2018-10-11 10:06:20 -07:00
Robbie Zhang
8a5d5b670f Make the metrics test more robust in multi-container case 2018-10-10 18:43:37 -07:00
Robbie Zhang
05595835f1 Make default waiting reason to be Creating (#372) 2018-10-10 10:40:41 -07:00
Robbie Zhang
1d5c1a4d26 Merge branch 'master' into master 2018-10-09 12:32:07 -07:00
shidao-ytt
e6aa80d2c4 Add secret volume (#370)
* add secret volume implement with config map

Signed-off-by: xianwei.zw <xianwei.zw@alibaba-inc.com>
Signed-off-by: shidao-ytt <shidao.ytt@alibaba-inc.com>

* add request log for CreateContainerGroup
2018-10-09 12:30:18 -07:00
robbiezhang
5a00c27b9c Update kubernetes projects version in vendor to 1.12.1 2018-10-06 00:53:39 +00:00
Brian Goff
8e29415bf7 Convert errors to OC status 2018-09-26 13:48:40 -07:00