Commit Graph

54 Commits

Author SHA1 Message Date
Brian Goff
da5e24ef4d Move API handlers to separate package
This makes the package split a little cleaner and easier to import the
HTTP handlers for other consumers.
2018-09-18 11:08:24 -07:00
Brian Goff
74f76c75d5 Instrustment handlers for logging/error handling
This refactors a bit of the http handler code.
Moves error handling for handler functions to a generic handler.
This also has a side-effect of being able to propagate errors from the
provider to send the correct status code, provided the error type
matches a pre-defined interface.
2018-09-17 16:54:24 -07:00
Brian Goff
8eb6ab4bcd Remove intermediate API server objects
Instead just generate HTTP handler functions directly.
2018-09-17 14:47:26 -07:00
Brian Goff
8091b089a2 Plumb context to providers 2018-09-13 13:49:26 -07:00
robbiezhang
4e20fc40ca Override the host in kubeconfig if MASTER_URI EnvVar is set 2018-09-10 12:56:50 -07:00
robbiezhang
0f54e1ed9c Bug fixes 2018-09-07 18:46:49 -07:00
Robbie Zhang
b019ec5549 Bug Fixes (#329) 2018-08-27 11:53:59 -07:00
Brian Goff
8de6693460 Don't use globals for API server
Refactors how HTTP servers are started and binds them to objects that
can store the provider rather than relying on a global.
2018-08-20 11:52:54 -07:00
Brian Goff
e8abca0ac9 Add supports for stats in ACI provider
This adds a new, optional, interface for providers that want to provide
stats.
2018-08-17 17:03:25 -07:00
Brian Goff
1e774a32b3 Use standard logging package (#323) 2018-08-17 16:50:24 -07:00
Robbie Zhang
d7f97b9bfc If --taint is specified, set the taint value to empty (#322)
Add the old tolerations the examples to make it backward compatible during the switch
2018-08-15 17:44:51 -07:00
ramz
4875364f37 Merge branch 'master' into darwin-support 2018-08-15 15:38:35 +10:00
ageekymonk
662d1f07a8 Darwin specific lookup file without cri and vic 2018-08-15 15:26:10 +10:00
ageekymonk
eb60985bd7 Add darwin tag to not build for osx 2018-08-15 15:25:45 +10:00
Jacob LeGrone
5115c1e5cd Add back deprecated taint flag
TODO: Revert this commit

Related to #316
2018-08-14 17:09:44 -07:00
Jacob LeGrone
d47a0b2fc0 Add default provider taint and taint configuration options
This allows for more specificity when setting taint tolerations for
workloads. Three new env variables are introduced:

VKUBELET_TAINT_KEY (defaults to `virtual-kubelet.io/provider`)
VKUBELET_TAINT_VALUE (defaults to provider name)
VKUBELET_TAINT_EFFECT (defaults to `NoSchedule`)

BREAKING CHANGES:
- The default taint key of `azure.com/aci` is now
  `virtual-kubelet.io/provider`.
- Specifying a custom taint key is now done via an environment variable
  rather than the `--taint` command line flag.
2018-08-14 17:09:44 -07:00
Nick Maliwacki
bf02f887f0 Fix to build virtual-kubelet in windows 2018-08-09 18:31:35 -07:00
yaron2
36db5d9583 added Service Fabric Mesh provider 2018-07-31 16:00:56 -07:00
Robbie Zhang
3f83588e59 Reduce ACI API calls (#282)
* Reduce ACI API calls

Reduce reconcile calls and API calls in reconcile

* Fix the pod status update issue

* Revert a few unnecessary change
2018-07-31 13:31:00 -07:00
Daniel Mueller
31a415c83a Fix bug in exec command retrieval (#265)
The exec command as extracted from the query comprises only the first
part of the command and does not include potentially supplied
parameters. E.g.,
  $ kubectl exec pod -- ls -t /usr
  > command: ls

This change fixes the problem by moving away from the Query.Get API.
  $ kubectl exec pod -- ls -t /usr
  > command: [ls -t /usr]
2018-07-25 11:54:22 -07:00
Robbie Zhang
6723b0d719 Register the Node when GetNode Returns NotFound (#254) 2018-07-11 14:57:09 -07:00
Eric Jadi
6543b0d410 Added missing providers to providers.go for build-time validation (#253)
* build all providers compile-time to validate interface implementation

* removed duplicate CRI provider initialization
2018-07-09 11:56:17 -07:00
Eric Jadi
89921a08c1 Added clean exec functionality + ACI implementation - V2 (#244)
* Stubs and vkubelet changes

* added dependencies

* Azure provider exec implementation

* added missing dependencies

* added vkubelet imports

* added huawei exec stub

* Fixed exec tab functionality / stdin buffer length

* Removed unused import

* Added provider function GetPodFullName + ACI implementation

* Added error handling in ACI provider exec
2018-07-06 14:12:05 -07:00
Liang Mingqiang
3e8a1b9bb5 config files for mock provider (#247) 2018-07-06 14:07:33 -07:00
Fei Xu
a30303035f Huawei Cloud Provider implementation (#241)
* add huawei CCI provider

* add readme

* add vender

* add huawei provider mock test
2018-06-29 10:21:15 -07:00
Robbie Zhang
e1fa5b03af [Azure] Increase the Default Node Quota for ACI (#240)
* Increase the default quota for ACI provider

* VK update the node capcity

* VK update node IP addresses
2018-06-25 11:08:49 -07:00
Lawrence Gripper
d6e8b3daf7 Create a provider to use Azure Batch (#133)
* Started work on provider

* WIP Adding batch provider

* Working basic call into pool client. Need to parameterize the baseurl

* Fixed job creation by manipulating the content-type

* WIP Kicking off containers. Dirty

* [wip] More meat around scheduling simple containers.

* Working on basic task wrapper to co-schedule pods

* WIP on task wrapper

* WIP

* Working pod minimal wrapper for batch

* Integrate pod template code into provider

* Cleaning up

* Move to docker without gpu

* WIP batch integration

* partially working

* Working logs

* Tidy code

* WIP: Testing and readme

* Added readme and terraform deployment for GPU Azure Batch pool.

* Update to enable low priority nodes for gpu

* Fix log formatting bug. Return node logs when container not yet started

* Moved to golang v1.10

* Fix cri test

* Fix up minor docs Issue. Add provider to readme. Add var for vk image.
2018-06-22 16:33:49 -07:00
Robbie Zhang
027b76651d Do not Sync ProviderFailed Pod Status (#227) 2018-06-18 10:21:09 -07:00
Robbie Zhang
22a4114890 Add an extra loop when the pod watcher is closed unexpectedly. (#226) 2018-06-11 14:09:16 -07:00
Loc Nguyen
513cebe7b7 VMware vSphere Integrated Containers provider (#206)
* Add Virtual Kubelet provider for VIC

Initial virtual kubelet provider for VMware VIC.  This provider currently
handles creating and starting of a pod VM via the VIC portlayer and persona
server.  Image store handling via the VIC persona server.  This provider
currently requires the feature/wolfpack branch of VIC.

* Added pod stop and delete.  Also added node capacity.

Added the ability to stop and delete pod VMs via VIC.  Also retrieve
node capacity information from the VCH.

* Cleanup and readme file

Some file clean up and added a Readme.md markdown file for the VIC
provider.

* Cleaned up errors, added function comments, moved operation code

1. Cleaned up error handling.  Set standard for creating errors.
2. Added method prototype comments for all interface functions.
3. Moved PodCreator, PodStarter, PodStopper, and PodDeleter to a new folder.

* Add mocking code and unit tests for podcache, podcreator, and podstarter

Used the unit test framework used in VIC to handle assertions in the provider's
unit test.  Mocking code generated using OSS project mockery, which is compatible
with the testify assertion framework.

* Vendored packages for the VIC provider

Requires feature/wolfpack branch of VIC and a few specific commit sha of
projects used within VIC.

* Implementation of POD Stopper and Deleter unit tests (#4)

* Updated files for initial PR
2018-06-04 15:41:32 -07:00
Fei Xu
9c38c1bdfb Add namespace for storeKey in ResourceManager (#211)
* add namespace for storeKey in RM

* fix UT for add namespace
2018-05-29 10:45:03 -07:00
Fei Xu
8068f3cac8 gofmt the project files (#205) 2018-05-18 16:13:34 -07:00
Ben Corrie
c6c89f062f CRI Provider implementation (#195)
* First commit of CRI provider. Vendor deps not included

* First commit of CRI provider. Vendor deps not included

* Tidy up comments and format code

* vendor grpc, CRI APIs, update protobuf and tidy logging

* First commit of CRI provider. Vendor deps not included

* Tidy up comments and format code

* vendor grpc, CRI APIs, update protobuf and tidy logging

* Add README

* Fix errors in make test
2018-05-15 08:50:52 -07:00
Robbie Zhang
f3ebde2533 Add the kubernete.io/hostname label to the VK node (#188) 2018-05-08 12:13:05 -07:00
Onur Filiz
feb2366e60 Add skeleton Fargate provider 2018-04-26 11:06:42 -07:00
Robbie Zhang
2b85b0d1df Fill in Default Values for CPU/Memory (#130)
Update k8s client and the dependencies
ACI client change for Mocking
Add ACI Provider Mock Tests
Add the Windows development environment
Add UT for Default Resource Requests
Enable the make test in Docker file
Update the vendors
2018-04-16 10:31:16 -07:00
Nick Schuch
cf30854bb1 Provider: Mock (#72)
* Provider: Mock

* Add pod conditions

* Mock: Convert pod list to a map and allow 'internalIP' to be configurable
2018-02-01 09:48:42 -08:00
Bhargav Nookala
a48f9866f2 Adding node exclusion label 2018-01-26 00:16:32 -08:00
chshou
8c0345edcf [Azure] Filters service account secret volume mount for Windows (#60)
* filters the SA secret volume for windows

* make it a map

* bettern go convention
2018-01-22 11:19:53 -08:00
Sam J Sharpe
922364ee5f Correct typo kuberentes->kubernetes (#58)
This seems to be a common typo, possibly exacerbated by copy-paste
of comment strings. I spotted it in the README.md at first, so I fixed
that and then checked the rest of the code and fixed a few more. They
are all in comments or documentation, so there's no code issue.

FYI, there's still some in the vendor directory, but I haven't fixed
those as they'd get replaced by any new `go get` I think:

$ ack uberentes
vendor/k8s.io/apimachinery/hack/godep-deps.sh
20:# 2. godep restore based on k8s.io/kuberentes provided manifest

vendor/k8s.io/client-go/CHANGELOG.md
120:* Included bug fixes in k8s.io/kuberentes release-1.5 branch, up to

vendor/k8s.io/client-go/kubernetes/fake/register.go
64://     clientsetscheme "k8s.io/client-go/kuberentes/scheme"

vendor/k8s.io/client-go/kubernetes/scheme/register.go
64://     clientsetscheme "k8s.io/client-go/kuberentes/scheme"

Sorry, this isn't the most exciting commit in the world :-(
2018-01-11 12:37:04 -08:00
Rajasekharan Vengalil
a4e99c2133 Implement web broker provider and a sample provider in Rust 2018-01-04 16:48:58 -08:00
Rita Zhang
8b59becf35 Return error to kubectl logs; use http statuscode 2017-12-22 00:08:10 -08:00
Rita Zhang
43137d09f7 Use mux to handle req; get tail from req 2017-12-21 21:42:05 -08:00
Rita Zhang
04db926faa Set Status.DaemonEndpoints.KubeletEndpoint.Port to KUBELET_PORT 2017-12-20 19:13:56 -08:00
Rita Zhang
f047137819 Add env var for kubelet port and ensure kubelet works without logs 2017-12-20 17:35:10 -08:00
Rita Zhang
bcc5a33098 Mount secret for api server cert and key 2017-12-15 18:35:49 -08:00
Rita Zhang
105c9fdada Remove some logging 2017-12-15 17:25:19 -08:00
Rita Zhang
123863c1ae Integrate apiserver with provider GetContainerLogs 2017-12-15 17:25:19 -08:00
Rita Zhang
e0c9da5d95 Enable kubectl logs po 2017-12-15 17:25:18 -08:00
robbiezhang
26ce922906 Add the missing package 2017-12-05 17:54:13 -06:00