Commit Graph

43 Commits

Author SHA1 Message Date
Heba Elayoty
077ee93fa2 fix: Fix opentelemetry dependencies issues (#1122)
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
2023-06-15 18:23:16 -07:00
Brian Goff
2c4442b17f Fix linting issues and update make lint target.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-10-07 23:21:47 +00:00
Brian Goff
db5bf2b0d3 Output test results in junit and export to circle 2021-05-20 17:20:27 +00:00
Pires
99ad66814b build: use Go 1.15
Signed-off-by: Pires <pjpires@gmail.com>
2021-01-10 16:41:31 +00:00
Sargun Dhillon
735eb34829 This adds the v1 lease controller
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
2021-01-05 11:40:44 -08:00
Sargun Dhillon
9a60ea2494 Switch to using Makefile for lint
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.
2020-12-06 13:20:03 -08:00
Sargun Dhillon
1a2c0bb029 Do not export KUBEBUILDER_ASSETS variable
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.
2020-11-16 11:11:52 -08:00
Brian Goff
93d9a5c9f8 Merge pull request #915 from sargun/add-fmt-target
Add fmt target
2020-11-16 10:43:41 -08:00
Sargun Dhillon
258e809721 Remove $Q Makefile command surpression
The whole $Q thing is unintuitive and that's not how Makefiles
typically act. It's confusing.
2020-11-16 10:30:30 -08:00
Sargun Dhillon
0b946848ee Add fmt target
This adds a target that allows the users to run goimports
across the entire repo.
2020-11-16 03:49:02 -08:00
Sargun Dhillon
1c581260d5 Add envtest
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>
2020-11-06 20:37:35 -08:00
Adrien Trouillaud
72a0be3f45 upgrade to go 1.13
required by k8s libs at 1.18
2020-07-07 21:00:56 -07:00
Adrien Trouillaud
845b4cd409 upgrade k8s libs to 1.18.4 2020-07-07 21:00:56 -07:00
Sargun Dhillon
bef6eda40d Add versioning pinning checker and instructions
This ensures that the version pinning is setup correctly, so all the deps
are pointing at the right underlying versions.
2020-06-04 16:27:04 -07:00
Sargun Dhillon
65c5446c94 Set timeout for tests on CI to 9 minutes
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.
2019-08-12 13:45:30 -07:00
Brian Goff
3840bc2666 Remove vendor/ (#688)
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.
2019-07-02 18:04:40 +01:00
Brian Goff
b915cde1ae Fix error handling for delete pod (#685)
* 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
2019-06-29 08:07:24 +01:00
Brian Goff
77069e63e5 Update to use go modules (#671)
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.
2019-06-19 16:17:22 +01:00
Brian Goff
a00c2f4b8b Remove providers (#670)
* 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.
2019-06-18 11:11:11 +01:00
Brian Goff
c6fdae931a Remove version package (#667)
This moves version declaration into cmd/virtual-kubelet/main.go
From here values are passed down into the things that need it.
2019-06-14 20:19:39 +01:00
Brian Goff
21d8ba2206 Don't use -a on build (#646)
This lets us utilize the go build cache and significantly speeds up
builds.
2019-05-29 08:15:34 -07:00
Sargun Dhillon
d183dbbe17 Upgrade to Go 1.12 (#630) 2019-05-20 11:39:47 +01:00
Hector Fernandez
49e3cafa76 Makefile: fix gobin path 2019-05-11 13:08:21 +02: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
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
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
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
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
muya-zj
e5c3d0104c [AlibabaCloud] Change alicloud to alibabacloud (#470) 2018-12-26 06:42:56 -08:00
Paulo Pires
5512db892a test: deploy vk when running e2e
Signed-off-by: Paulo Pires <pjpires@gmail.com>
2018-12-01 19:24:55 +00: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
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
Brian Goff
eb22b3b9e1 fix bad variable reference 2018-10-05 08:42:06 -07:00
Brian Goff
17d76d9492 Pass go build tags from environment.
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.
2018-10-04 15:05:08 -07:00
Luca Castellano
197fddf335 Add support for correctly displaying node and pod IP address + fix make clean 2018-06-21 10:18:47 -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
Kit Ewbank
8f6b4b9e20 Fix 'make clean'. (#191) 2018-05-10 10:54:24 -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
Erik St. Martin
1585999226 Fixing Docker build 2017-12-05 17:54:12 -06:00
Brian Ketelsen
88a0d4844f Makefile: cleanup authors target to preserve history 2017-12-05 17:54:08 -06:00
Brian Ketelsen
1a62e34104 Makefile: remove unused targets 2017-12-05 17:54:07 -06:00
Ria Bhatia
0075e5b0f3 Initial commit 2017-12-05 17:53:58 -06:00