Commit Graph

1044 Commits

Author SHA1 Message Date
Paul "Hampy" Hampson
a2515d859a Fix non-linked reference to Providers in Usage
Fixes a typo ("provides") and also replaces "listed above" with a link to the list. Which had moved below, as it happens.
2021-05-14 02:45:33 +10:00
champly
0df7ac4e80 fix jaeger deprecated config 2021-05-12 10:36:58 +08:00
Alex Palesandro
96eae1906b Adding Liqo to README.md 2021-05-07 22:58:46 +02:00
Brian Goff
8437e237be Copy stats types from upstream.
This drops another dependency on k8s.io/kubernetes.
This does have the unfortunate side effect that implementers will now
get a compile error until they update their code to use the new type.

Just as a note:

The stats types have moved to k8s.io/kubelet, however the stats types
are only there as of v1.20.
Currently we support older versions than v1.20, and even our go.mod
imports from v1.19.

For now we copy the types in. Later we can remove the type defs and
change them to type aliases to the k8s.io/kubelet types (which prevents
another compile time issue).

Anything relying on type assertions to determine if something implements
this method will, unfortunately, be broken and it will be hard to notice
until runtime. We need to make sure to call this out in the release
notes.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-05-05 23:01:52 +00:00
Brian Goff
baa0e6e8fc Merge pull request #968 from cpuguy83/cleanup_some_kk
Don't import pod util package from k/k
2021-05-04 17:26:49 -07:00
Brian Goff
405d5d63b1 Don't import pod util package from k/k
These are all simple changes that will not change w/o breaking API
changes upstream anyway.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-05-04 23:55:30 +00:00
Brian Goff
e1486ade00 Merge pull request #966 from sargun/upgrade-k8s
Upgrade k8s to v19
2021-04-25 07:18:39 -07:00
Sargun Dhillon
4c223a8cd9 Upgrade to Kubernetes 19.10
Kubernetes 18.X is deprecated and no longer receiving updates.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
2021-04-23 00:47:51 -07:00
Brian Goff
bf3a764409 Merge pull request #962 from sargun/expose-custom-retry 2021-04-15 15:35:34 -07:00
Sargun Dhillon
b259cb0548 Add the ability to dictate custom retries
Our current retry policy is naive and only does 20 retries. It is
also based off of the rate limiter. If the user is somewhat aggressive in
rate limiting, but they have a temporary outage on API server, they
may want to continue to delay.

In facts, K8s has a built-in function to suggest delays:
https://pkg.go.dev/k8s.io/apimachinery/pkg/api/errors#SuggestsClientDelay

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
2021-04-14 10:52:26 -07:00
Sargun Dhillon
e95023b76e Fix test
This starts watching for events prior to the start of the controller.
This smells like a bug in the fakeclient bits, but it seems to fix
the problem.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
2021-04-14 10:52:26 -07:00
Sargun Dhillon
5fd08d4619 Merge pull request #958 from sargun/fix-deletionQ
Remove errant double queue
2021-03-24 12:12:29 -07:00
Sargun Dhillon
c40a255eae Remove errant double queue
This seems to be a typo where we erroneously double-queue a deletion,
but one without the "key".
2021-03-24 10:21:27 -07:00
Sargun Dhillon
616538ef01 Merge pull request #955 from sargun/fix-pod-status-update
Fix pod status update
v1.5.0
2021-02-17 12:02:38 -08:00
Sargun Dhillon
c4582ccfbc Allow providers to update pod statuses
We had added an optimization that made it so we dedupe pod status updates
from the provider. This ignored two subfields that could be updated along
with status.

Because the details of subresource updating is a bit API server centric,
I wrote an envtest which checks for this behaviour.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
2021-02-16 12:30:53 -08:00
Sargun Dhillon
7feb175720 Split up lifecycle test wireUpSystem function
This splits up the wireUpSystem function into a chunk that makes it
"client agnostic". It also removes the requirement that the client
is faked.
2021-02-16 12:30:51 -08:00
Sargun Dhillon
0e1cc1566e Create envtest wrapper
Lift up a little bit of the common envtest code into a common wrapper function.
2021-02-16 12:30:51 -08:00
Pires
d11968a0fd Merge pull request #908 from cwdsuzhou/race_delete
Fix race between k8s and provider when deleting pod
2021-02-16 15:44:48 +00:00
wadecai
3ff1694252 Fix race between k8s and provider when deleting pod 2021-02-16 17:45:55 +08:00
Sargun Dhillon
53e96e03a9 Merge pull request #952 from sargun/add-tracking-info
Add Alternative Workqueue Implementation
2021-02-12 15:20:06 -08:00
Sargun Dhillon
3a361ebabd queue: Add tracing
This adds tracing throughout the queues, so we can determine what's going on.
2021-02-08 11:07:03 -08:00
Sargun Dhillon
ac9a1af564 Replace golang workqueue with our own
This is a fundamentally different API than that of the K8s workqueue
which is better suited for our needs. Specifically, we need a simple
queue which doesn't have complex features like delayed adds that
sit on "external" goroutines.

In addition, we need deep introspection into the operations of the
workqueue. Although you can get this on top of the K8s workqueue
by implementing a custom rate limiter, the problem is that
the underlying rate limiter's behaviour is still somewhat
opaque.

This basically has 100% code coverage.
2021-02-08 11:07:03 -08:00
Sargun Dhillon
fd3da8dcad Merge pull request #954 from feiskyer/clean-charts
clean-up charts
2021-02-07 23:49:54 -08:00
Pengfei Ni
731d0d6f5c clean-up charts 2021-02-08 13:18:00 +08:00
Sargun Dhillon
2ac4ff9b35 Merge pull request #953 from sargun/break-up-ratelimiters 2021-02-03 04:18:07 -08:00
Sargun Dhillon
82452a73a5 Split out rate limiter per workqueue
If you share a ratelimiter between workqueues, it breaks.

WQ1: Starts processing item (When)
WQ1: Fails to process item (When)
WQ1: Fails to process item (When)
WQ1: Fails to process item (When)
--- At this point we've backed off a bit ---
WQ2: Starts processing item (with same key, When)
WQ2: Succeeds at processing item (Forget)
WQ1: Fails to process item (When) ---> THIS RESULTS IN AN ERROR

This results in an error because it "forgot" the previous
rate limit.
2021-02-02 11:40:58 -08:00
Brian Goff
2fa03a15a2 Merge pull request #951 from Jeffwan/update_email_list
Update mailing list link
2021-01-29 09:25:39 -08:00
Jiaxin Shan
eb7553e6c4 Update mailing list link 2021-01-26 16:21:41 -08:00
Brian Goff
3cfd4737dc Merge pull request #949 from pires/bugfix/klogv2_withfields
log: fix klogv2.WithField(s)
v1.4.0
2021-01-20 09:44:10 -08:00
Pires
346c20c005 log: fix klogv2.WithField(s)
Signed-off-by: Pires <pjpires@gmail.com>
2021-01-20 13:53:23 +00:00
Pires
fa139bfe27 Merge pull request #947 from pires/bugfix/klogv2
log: fix klog depth and output format
2021-01-15 19:00:34 +00:00
Pires
cb0e18e6a1 log: refactor klogv2 tests
Signed-off-by: Pires <pjpires@gmail.com>
2021-01-15 18:47:50 +00:00
Brian Goff
379031eb61 Merge pull request #945 from miekg/no-kube2 2021-01-15 10:23:35 -08:00
Pires
25b8c546a0 log: process fields only on first klog call
Signed-off-by: Pires <pjpires@gmail.com>
2021-01-15 18:23:32 +00:00
Miek Gieben
53fcbe7abe Merge branch 'master' into no-kube2 2021-01-15 09:42:44 +01:00
Miek Gieben
7662a48922 Skip internal/kubenernetes from linting
Signed-off-by: Miek Gieben <miek@miek.nl>
2021-01-15 09:25:17 +01:00
Pires
46bfb01cd4 log: fix klogv2 With* funcs
Signed-off-by: Pires <pjpires@gmail.com>
2021-01-14 21:07:04 +00:00
Pires
c2b4863f40 log: fix klog depth
Signed-off-by: Pires <pjpires@gmail.com>
2021-01-14 20:23:46 +00:00
Brian Goff
5edfe23bd5 Merge pull request #944 from miekg/no-kubernetes 2021-01-13 15:48:33 -08:00
Miek Gieben
c9969ee33d Import kubernetes/remotecommand
Copy/paste some more kubernetes code. This is to remove the dep on
kubernetes/kubernetes from within exec.go

See #940

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-01-12 13:18:30 +01:00
Miek Gieben
ff61469113 Merge branch 'master' into no-kubernetes 2021-01-12 07:44:42 +01:00
Pires
20c064848a Merge pull request #942 from pires/chore/golang_1.15
build: use Go 1.15
2021-01-11 21:29:29 +00:00
Pires
9e711f3276 Merge pull request #941 from pires/feature/klogv2
log: add klog/v2
2021-01-11 18:24:31 +00:00
Pires
be76c022ae log: validate log.Logger impl at compile time
Signed-off-by: Pires <pjpires@gmail.com>
2021-01-11 18:17:01 +00:00
Miek Gieben
e82e46e5de Copy past golang/expansion from kubernetes/kubernetes
Try to stop depending on kubernetes/kubenetes. Copy golang/expansion
into the virtual-kubelet repo. The upstream code looks super stable, so
there is little harm to copy it here.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-01-11 11:56:24 +01:00
Pires
eda7adbdb4 log: add klog/v2
Fixes #924

Signed-off-by: Pires <pjpires@gmail.com>
2021-01-10 23:42:06 +00:00
Pires
9affe97f88 Merge pull request #943 from pires/chore/bump_k8s
e2e: test with Kubernetes to 1.20.1
2021-01-10 23:40:10 +00:00
Pires
9e522952c3 e2e: test with Kubernetes to 1.20.1
Signed-off-by: Pires <pjpires@gmail.com>
2021-01-10 17:11:53 +00:00
Pires
99ad66814b build: use Go 1.15
Signed-off-by: Pires <pjpires@gmail.com>
2021-01-10 16:41:31 +00:00
Brian Goff
9745a6a9bc Merge pull request #939 from sargun/fix-name
Fix key name in log entry
2021-01-08 10:43:50 -08:00