Commit Graph

697 Commits

Author SHA1 Message Date
Ben Corrie
99fddc23fe Merge pull request #605 from sflxn/remove-vic-provider
Remove VIC provider code.
2019-05-06 17:17:18 -07:00
sflxn
4feab78b76 Remove VIC provider code.
The VIC provider is stale and there are no developers working on this
anymore.  Removing the provider from the repo.
2019-05-06 16:52:53 -07:00
Sargun Dhillon
ab1d15a96a Do not swallow errors from the zpages server silently
If the zpages server exits for any reason, or is unable to bind,
rather than exiting silently, throw an error.
2019-05-06 11:10:17 -07:00
Kevin亓
cfa37871ab fix: fix a typo in azure/aci_test (#589)
Signed-off-by: KevinBetterQ <1093850932@qq.com>
2019-05-06 09:45:55 -07:00
Luc Perkins
0583b5c4fd Add local CNCF logo (#591)
* Add local CNCF logo

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Update footer icon

Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-05-06 09:44:57 -07:00
Sargun Dhillon
ef62defcea Run "make format" (#603)
There was some code that wasn't formatted according to gofmt. This
fixes that.
2019-05-06 09:26:10 -07:00
Sargun Dhillon
f1cb6a7bf6 Add the concept of startup timeout (#597)
This adds two concepts, where one encompasses the other.

Startup timeout
Startup timeout is how long to wait for the entire kubelet
to get into a functional state. Right now, this only waits
for the pod informer cache for the pod controllerto become
in-sync with API server, but this could be extended to other
informers (like secrets informer).

Wait For Startup
This changes the behaviour of the virtual kubelet to wait
for the pod controller to start before registering the node.

It is to avoid the race condition where the node is registered,
but we cannot actually do any pod operations.
2019-05-06 09:25:00 -07:00
Sargun Dhillon
74a16f7f9a Use gobin to fix version numbers of tools (#598)
I ran into a bunch of problems running goreleasers, and
some differences with goimports. This locks the versions
to versions that appear to work.

The goimports version is newer than the latest version run
on the repo, but it matches the version of Go used on the rest of
the project.
2019-05-06 09:03:44 -07:00
Stuart Leeks
eb87db8731 typo (#588) 2019-05-01 08:06:30 -07:00
Luc Perkins
aebc81ec1c Add local logos (#585)
* Add local logos

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Fix Hugo version name in Netlify config

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Fix URL for CNCF logo

Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-04-26 17:11:31 -07:00
Brian Goff
d809dff289 Refactor exec interface (#578)
This removes the dependence on remotecommand in providers as well as the
need to expose provider ID's for the sake of the ExecInContainer API.
2019-04-26 12:57:56 -07:00
Brian Goff
449eb3bb7d Fix exec parameter parsing (#580)
Exec seems to be broken by ad6fbba806
This change basically copies what's in remotecommand.NewOptions, just
without the logging.
2019-04-25 15:51:53 -07:00
Sargun Dhillon
3da9b0d105 Stop using deprecated method Clientset.Coordination (#581)
Clientset.Coordination is deprecated. We are meant to use the specific
version of the client: CoordinationV1beta1. Clientset.Coordination is
going to be removed in future versions of the client API.
2019-04-23 14:17:15 -07:00
Jeremy Rickard
45d2ef06b2 Update ACI liveness/readiness probe handling to work with named ports (#333)
* Update ACI liveness/readiness probe handling to work with named ports
2019-04-23 11:43:48 -07:00
Brian Goff
ceb9b16c5c Don't set cancel function to nil on error (#579)
When setting up the http server we return a cancel function to close all
the listeners down.
The issue here is we set the cancel function to nil and thereby cause a
panic when there is an error and the `defer` attempts to call cancel.

This fix just don't set a named return value for the cancel function to
make sure we don't overwrite it with a `return nil, err`.
This ensures that the `defer` can still call `cancel()`.
2019-04-22 10:31:06 -07:00
Brian Goff
8d0b843ae4 Refactor CLI initialization (#562)
This cleans up the CLI code significantly.
Also makes some of this re-usable for providers who want to do so.

This also removes the main.go from the top of the tree of the repro,
instead moving it into cmd/virtual-kubelet.
This allows us to better utilize the package namespace (and e.g. mv the
`vkubelet` package to the top of the tree).
2019-04-19 17:02:39 -07:00
Hector Fernandez
d3f13cc6ff providers: fix string format (#575) 2019-04-19 08:10:03 -07:00
Yash Desai
de32752395 Set container env var using services. (#573)
* Introduce service env vars.
2019-04-17 11:30:39 -07:00
Brian Goff
6cb323eec2 More Makefile enhancements (#569)
Allows us to make use of of make's target deps instead of re-execing
make in our build target just for custom, one-shot environment changes.

Keeps e2e bin in bin/e2e/virtual-kubelet.
2019-04-15 16:03:45 -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
Brian Goff
686cdb8b36 uncomment skaffold/delete on e2e.clean
This was commented while I was testing and I forgot to uncomment.
v0.9.0
2019-04-04 10:13:07 -07:00
Anubhav Mishra
455b0cc4a6 Adding HashiCorp Nomad homepage links (#567)
* Add nomad link to readme.
2019-04-03 23:08:26 -07:00
Brian Goff
261359d20e Merge pull request #564 from cpuguy83/fix_version_on_node_create
Fix node create after delete
2019-04-03 23:06:02 -07:00
Brian Goff
99c07d487e Fix node create after delete
node.ResourceVersion must not be set when creating a node.
This issue prevents vk from resolving issues after the vk node instance
has been deleted (for whatever reason).
2019-04-03 22:57:11 -07:00
Brian Goff
af06b005b2 Fix some cases with e2e targets
The e2e targets were not setup correctly preventing some variables from
being set.
2019-04-03 22:57:11 -07:00
Ria Bhatia
9dc78bd4d3 adding virtual kubelet 2019 roadmap (#473)
* adding doc folder

* initial draft

* initial draft-2

* initial draft-3

* initial draft-4

* adding testing and use cases

* format
2019-04-03 14:09:40 -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
Yash Desai
85292ef4ef Patch the node status instead of updating it. (#557)
* Patch the node status instead of updating it.

Virtual-kubelet updates the node status periodically.
This change proposes we use the `Patch` API instead of `Update`,
to update the node status.
This avoids overwriting any node updates made by other controllers
in the system, for example a attach-detach controller.
Patch API does a strategic merge instead of overwriting
the entire object, which ensures parallel updates don't overwrite
each other.

Note: `PatchNodeStatus` reduces the time precision to the seconds-level
and therefore I corrected the test for this.

consider two controllers:
CONTROLLER 1 (virtual kubelet)                       | CONTROLLER 2
oldNode := nodes.Get(nodename)                       |
                                                     | node := nodes.Get(nodename)
                                                     | // update status with attached volumes info
                                                     | updateNode := Nodes.UpdateStatus(node)
// update vkubelet info on node status               |
latestNode := Nodes.UpdateStatus(oldNode)            |
<-- latestNode does not contain the volume info added by second controller.

with my patch change:

CONTROLLER 1 (virtual kubelet)                       | CONTROLLER 2
oldNode := Nodes.Get(nodename)                       |
                                                     | node := Nodes.Get(nodename)
                                                     | // update status with attached volumes info
                                                     | updateNode := Nodes.UpdateStatus(node)
node := oldNode.DeepCopy()                           |
// update vkubelet info on node status               |
latestNode := util.PatchNodeStatus(oldNode, node)    |
<-- latestNode contains the volume info added by second controller.

Testing Done: make test

* Introduce PatchNodeStatus into vkubelet.

* Pass only the node interface.
2019-04-03 10:40:57 -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
1dadd46e20 Use Debian go image in Dockerfile
The build needs bash in order to process build tags correctly. Alpine
doesn't come with bash... Debian comes with all the things we need out
of the box, so let's just use that.
2019-04-01 15:14:21 -07:00
Brian Goff
80de7fd566 Fix typo 2019-04-01 11:43:54 -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
Luc Perkins
561ccca561 Add Helm documentation (#517)
* Add required blocks to Helm templates

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Make CLI table border lighter

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Change aesthetic of CLI table

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Add admonition blocks

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Fix wording

Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-03-28 15:30:30 -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
Ria Bhatia
6672df0b7b Update README.md
Fixing calendar spelling
2019-03-27 16:41:22 -07:00
Sravan Rengarajan
aa581a0f9c Merge pull request #552 from srrengar/acidocchanges
ACI readme updates
2019-03-27 16:36:32 -07:00
Sravan Rengarajan
60c5807304 Merge branch 'master' into acidocchanges 2019-03-27 12:26:15 -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
dd815dafc3 Add tracing options to helm chart (#551) 2019-03-27 12:01:37 -07:00
Luc Perkins
4a14a71ebe Add initial ADOPTERS file (#547)
Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-03-25 16:42:37 -07:00
Ria Bhatia
3f10f40f0a Update README.md
I had a typo! :(
2019-03-25 15:53:43 -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
Luc Perkins
9e245f3737 Additional provider docs (#498)
* Modify providers shortcode

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Add extra note to provider section

Signed-off-by: lucperkins <lucperkins@gmail.com>

* More info in Providers doc

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Update Alibaba tag

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Add resources directory back to Git

Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-03-25 14:16:33 -07:00
Zhengyi Lai
c898aefdcb Fix typo (#539)
Signed-off-by: Zhengyi Lai <zheng1@yunify.com>
vtest
2019-03-19 11:48:41 -07:00
Luc Perkins
73a989d7cc Remove resources folder from Git (#536)
Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-03-12 12:08:23 -07:00
Vineeth Reddy
5cea3e7ea8 FieldRef feature for DownwardAPI (#534)
* FieldRef feature for DownwardAPI

Signed-off-by: VineethReddy02 <vineethpothulapati@outlook.com>

* Unit tests for FieldRef

Signed-off-by: VineethReddy02 <vineethpothulapati@outlook.com>
2019-03-08 11:15:08 -08: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