This refactors the v1 lease controller. It makes two functional differences
to the lease controller:
* It no longer ties lease updates to node pings or node status updates
* There is no fallback mechanism to status updates
This also moves vk_envtest, allowing for future brown-box testing of the
lease controller with envtest
This uses gobin in the Makefile for golint. Gobin allows for easier
pinning of dependencies that are project specific, as in the actual
gobin command invocation you can specify the version.
This sets KUBEBUILDERA_ASSETS only for envtest. No need to leak
the variable throughout the tests. In addition, it makes it easier
to figure out how to run the tests yourself on command line.
I know it's not an impressive test. It just brings up a node, and
makes sure it registers. Let's do more in the future.
Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Right now, if the tests get stuck (on CI), they are terminated
after 10 minutes. This means as well that we get 0 output about
what went wrong.
Instead, this triggers a panic after 9 minutes on CI.
Vendoring seems to be problematic with go modules.
In addition to causing issues with transitive dependencies and being
problematic when trying to pull in the node-cli code, it also seems to
be pulling different versions than what is computed in go.mod.
This can be seen by comparing commits from the computed version in
go.mod with very small diffs (like a single Godep change in k8s) but massive
vendoring changes.
Basically I have very little confidence that this is even working.
This should be better in go1.13, but this is not released yet.
* Fix error handling for delete pod
- Error handling was looking for a k8s error from the provider, but
providers should be using errdefs.
- Error handling was returning early if pod was not found and deleting
from k8s in all other cases.
* Don't run unit tests twice
This includes updates to CI config, vendor files, etc.
I've hard-coded the k8s depedency at 1.13.4 to keep it inline with what
we currently have and to make sure a another run of `go mod tidy`
doesn't accidentally update it to an unexpected version.
Thanks to hectorj2f for carrying this along.
* Move all but mock provider out of tree
These have all been moved to repos under github.com/virtual-kubelet.
* Introduce a providers.Store
This essentially moves the the old register/ handling into a first class
object that can be controlled from the CLI rather than through build
tags deep in the code.
This actually would have made it a bit easier to build the provider
repos and makes the cmd/ code more re-usable.
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.
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).
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.
* 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.
* 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>
* 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>
Can now do something like `make VK_BUILD_TAGS=no_jaeger_exporter build`
and jaeger support will not be compiled in.
Currently there are build flags to omit every provider and every (the
only) supported tracing exporter.
* 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
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