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>
This commit is contained in:
Kevin Zhao
2019-03-29 09:27:57 +08:00
committed by Brian Goff
parent 947b530f1e
commit 5afb24809d
49 changed files with 6825 additions and 0 deletions

20
Gopkg.lock generated
View File

@@ -553,6 +553,22 @@
revision = "ee43cbb60db7bd22502942cccbc39059117352ab"
version = "v0.1.0"
[[projects]]
digest = "1:cc43a0f35c2c50d5af1d3f8fa1352bd6205f5d8fc0d4cb50c5aed8e0b3f7c703"
name = "github.com/gophercloud/gophercloud"
packages = [
".",
"openstack",
"openstack/container/v1/capsules",
"openstack/identity/v2/tenants",
"openstack/identity/v2/tokens",
"openstack/identity/v3/tokens",
"openstack/utils",
"pagination",
]
pruneopts = "NUT"
revision = "954aa14363ced787c28efcfcd15ae6945eb862fb"
[[projects]]
digest = "1:412beefef71413b580631c12a681ba2acab1ffdad9f967c38ed37e19fd101631"
name = "github.com/gorhill/cronexpr"
@@ -1810,6 +1826,10 @@
"github.com/docker/docker/api/types/strslice",
"github.com/google/go-cmp/cmp",
"github.com/google/uuid",
"github.com/gophercloud/gophercloud",
"github.com/gophercloud/gophercloud/openstack",
"github.com/gophercloud/gophercloud/openstack/container/v1/capsules",
"github.com/gophercloud/gophercloud/pagination",
"github.com/gorilla/mux",
"github.com/gorilla/websocket",
"github.com/hashicorp/nomad/api",