Commit Graph

95972 Commits

Author SHA1 Message Date
Sean McGinnis
be131457ef
Remove stale analytics links from docs
Many README files and other docs contained a link to a an appspot
tracking app that is no longer active. Following the links leads to an
error about Go 1.9 no longer being supported. Go 1.9 support was dropped
in appspot in 2019 and disabled June 2020.

This also resulted in a broken image link displaying when viewing these
files on GitHub. Since the app is no longer functioning, and since it
causes a potentially (but granted, minor) confusing error to display,
this just removes those links as I don't believe they are needed
anymore.

Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-11-18 07:04:48 -06:00
Kubernetes Prow Robot
b3fc888863
Merge pull request #96586 from Doude/for/upstream/master/96585
Fixes fake client test generation
2020-11-18 01:44:05 -08:00
Kubernetes Prow Robot
36d12390a7
Merge pull request #95906 from harche/iptables_fix
Verify iptable rules are applied for tcp, udp and icmp
2020-11-17 22:08:04 -08:00
Kubernetes Prow Robot
bd2f96d10b
Merge pull request #96640 from aojea/kubenetsctp
e2e SCTP test must not depend on kubenet
2020-11-17 21:10:05 -08:00
Anago GCB
89b52c729c CHANGELOG: Update directory for v1.20.0-beta.2 release 2020-11-18 03:08:44 +00:00
Kubernetes Prow Robot
160c33a6a1
Merge pull request #96533 from gnufied/reduce-vsphere-volume-name
Reduce volume name length for vsphere
2020-11-17 17:34:05 -08:00
Kubernetes Prow Robot
6715318ee7
Merge pull request #96644 from jingxu97/nov/tests
Mark some storage tests as LinuxOnly
2020-11-17 15:44:04 -08:00
Kubernetes Prow Robot
afeac926fa
Merge pull request #95981 from caesarxuchao/http2-healthcheck
Enables HTTP/2 health check
2020-11-17 14:48:05 -08:00
Kubernetes Prow Robot
3af376d3ad
Merge pull request #96626 from jingxu97/nov/topology
Update topology tests for windows
2020-11-17 13:22:17 -08:00
Kubernetes Prow Robot
114f9988ff
Merge pull request #96322 from zshihang/conformance
Promote TokenRequest e2e test to Conformance
2020-11-17 13:22:04 -08:00
Kubernetes Prow Robot
19b15b2fc2
Merge pull request #96526 from celestehorgan/use-k8s-more
Use K8s in the README
2020-11-17 12:14:20 -08:00
Kubernetes Prow Robot
e1ab99e0d6
Merge pull request #92743 from liggitt/gc
Fix GC uid races and handling of conflicting ownerReferences
2020-11-17 12:14:06 -08:00
Kubernetes Prow Robot
6dddea5abf
Merge pull request #96613 from tosi3k/deprecate-log-dump
Add a deprecation note to k/k/cluster/log-dump directory
2020-11-17 10:28:04 -08:00
Jing Xu
079a4ea30c Mark some storage tests as LinuxOnly
Some storage tests has commands not available in Windows. Mark them as
LinuxOnly now. Will check later to see whether equivalent windows
commands are available.

Change-Id: I41b5668c855b2754a2e332cff4e90ebf2981aca0
2020-11-17 09:53:50 -08:00
Jordan Liggitt
e491c3bc70 Add GC unit tests
Adds unit tests covering the problematic scenarios identified
around conflicting data in child owner references

                      Before   After
package level         51%      68%
garbagecollector.go   60%      75%
graph_builder.go      50%      81%
graph.go              50%      68%

Added/improved coverage of key functions that had lacking unit test coverage:

* attemptToDeleteWorker
* attemptToDeleteItem
* processGraphChanges (added coverage of all added code)
2020-11-17 10:49:32 -05:00
Jordan Liggitt
603a0b016e Log cluster-scoped owners referencing namespaced owners, avoid retrying lookups forever
If a cluster-scoped dependent references a namespace-scoped owner,
this is an invalid relationship, and the lookup will never succeed in attemptToDelete.

Short-circuit requeueing in attemptToDelete and log.
2020-11-17 10:49:30 -05:00
Jordan Liggitt
221e4aa2c2 Queue non-matching children for deletion when a virtual node is marked as observed
When we observe valid coordinates for a previously virtual node,
if there are dependents that do not agree with those coordinates,
add them to the attemptToDelete queue.

This queue will check the dependent's ownerReferences using the coordinates specified by the dependent.
If all of the owners can be verified absent, the dependent will be deleted.
If some are still present, or if there are errors looking them up, the dependent will not be deleted.

If the verified owner is namespaced, and the dependent is not in the same namespace,
an event will be recorded for user visibility, since cross-namespace ownerReferences are not supported.
2020-11-17 10:49:27 -05:00
Jordan Liggitt
b655f22509 Handle virtual delete events when children don't agree on owner coordinates
If a virtual delete event is received for a node whose dependents disagree on the parent's coordinates:
1. propagate the delete to children that matched the verified absent coordinates
2. if the existing node is virtual, select a new set of coordinates from the remaining dependents
3. do not delete the parent node from the graph if the parent node is non-virtual,
   or if there are dependents that do not agree with the virtual delete event coordinates
2020-11-17 10:49:07 -05:00
Jordan Liggitt
b8d7ecf73b Make node removal conditional in processGraphChanges 2020-11-17 10:49:04 -05:00
Jordan Liggitt
ac8d419b4c Enqueue dependents for deletion when their ownerReference does not match observed parent coordinates
When adding a dependent to the graph, we ensure there is a node representing each owner reference,
and add the dependent to each parent node.

If the parent node already exists, and the dependent's ownerReference
coordinates disagree with the verified coordinates, add the dependent to the attemptToDelete queue.

This queue will check the dependent's ownerReferences using the coordinates specified by the dependent.
If all of the owners can be verified absent, the dependent will be deleted.
If some are still present, or if there are errors looking them up, the dependent will not be deleted.

If the parent node has been observed via informer event (so we know the coordinates are accurate),
and the verified owner is namespaced, and the dependent is not in the same namespace,
an event will be recorded for user visibility, since cross-namespace ownerReferences are not supported.
2020-11-17 10:47:39 -05:00
Jordan Liggitt
78317edb8b Short-circuit attemptToDelete loop for virtual nodes that are removed or observed
Virtual nodes are added to the attemptToDelete queue, and continue getting requeued
until they are successfully verified absent or are observed via informer.

In the meantime, if the real object associated with that UID is observed via informer,
or is observed to be deleted via informer, the graph node for that UID can be removed
or marked as observed. In that case, we should stop retrying to get the virtual node coordinates.
2020-11-17 10:46:00 -05:00
Jordan Liggitt
cae56bea0a Replace virtual node with observed node if identity differs
If the graph contains a virtual node (because some child object referenced it in an OwnerRef),
and a real informer event is observed for that uid at different coordinates,
we want to fix the coordinates of the node in the graph to match the actual coordinates.

The safe way to do this is to clone the node, replace the identity in the clone,
then replace the node with the clone.

Modifying the identity directly is not safe because it is accessed lock-free from many code paths.

Replacing the node in the graph from processGraphChanges is safe because it is the only graph writer.
2020-11-17 10:42:48 -05:00
Jordan Liggitt
cb7b9ed532 Refactor identityFromEvent 2020-11-17 10:42:48 -05:00
Jordan Liggitt
30eb6683e6 Avoid marking virtual nodes as observed when they haven't been
Virtual nodes can be added to the GC graph in order to represent objects
which have not been observed via an informer, but are referenced via ownerReferences.

These virtual nodes are requeued into attemptToDelete until they are observed via an informer,
or successfully verified absent via a live lookup. Previously, both of those code paths
called markObserved() to stop requeuing into attemptToDelete.

Because it is useful to know whether a particular node has been observed via
a real informer event, this commit does the following:

* adds a `virtual bool` attribute to graph events so we know which ones came from a real informer
* limits the markObserved() call to the code path where a real informer event is observed
* uses an alternative mechanism to stop requeueing into attemptToDelete when a virtual node is verified absent via a live lookup
2020-11-17 10:42:48 -05:00
Jordan Liggitt
445f20dbdb Switch GC absentOwnerCache to full reference
Before deleting an object based on absent owners, GC verifies absence of those owners with a live lookup.

The coordinates used to perform that live lookup are the ones specified in the ownerReference of the child.

In order to performantly delete multiple children from the same parent (e.g. 1000 pods from a replicaset),
a 404 response to a lookup is cached in absentOwnerCache.

Previously, the cache was a simple uid set. However, since children can disagree on the coordinates
that should be used to look up a given uid, the cache should record the exact coordinates verified absent.
This is a [apiVersion, kind, namespace, name, uid] tuple.
2020-11-17 10:42:48 -05:00
Jordan Liggitt
14f7f3201f Add GC integration race test 2020-11-17 10:42:48 -05:00
Jordan Liggitt
09bdf76b8a Plumb event recorder to garbage collector controller 2020-11-17 10:42:45 -05:00
Antonio Ojea
59674755eb e2e SCTP test not depend on kubenet
e2e test should be platform and component independent.
Consumers can filter using tags or regex.
2020-11-17 16:34:48 +01:00
Kubernetes Prow Robot
0c97340905
Merge pull request #96453 from aojea/fixportconflict
e2e network tests with host network should Skip if ports are occupied
2020-11-17 05:18:07 -08:00
Antoni Zawodny
7acd8b50c8 Add a deprecation note to k/k/cluster/log-dump directory 2020-11-17 13:21:27 +01:00
Jing Xu
027867b594 Update topology tests for windows
Update storage topology tests setup for Windows

Change-Id: I9a2773b91806a10553db06f61f7259db4df71c3b
2020-11-16 23:21:08 -08:00
Kubernetes Prow Robot
147a120948
Merge pull request #82222 from Huang-Wei/0-informer-sync-period
Set 0 sync period in scheduler integration test
2020-11-16 11:16:04 -08:00
Kubernetes Prow Robot
44b9de34fe
Merge pull request #96460 from aojea/badtestsctp
SCTP testing: fixes and additions
2020-11-16 10:26:05 -08:00
Hemant Kumar
742436c431 Reduce volume name length for vsphere 2020-11-16 11:28:26 -05:00
Kubernetes Prow Robot
59ac565dbf
Merge pull request #96061 from tkashem/context-wiring
plumb context with request deadline
2020-11-16 06:29:05 -08:00
Chao Xu
15648f1a7b allow configuring ReadIdelTimeout and PingTimeout via env var 2020-11-15 21:40:04 +00:00
Chao Xu
ba7b1f7a89 Add a unit test testing the HTTP/2 health check help the REST client
detects broken TCP connections.
2020-11-15 21:40:04 +00:00
Abu Kashem
83f869ee13
plumb context with request deadline
- as soon as a request is received by the apiserver, determine the
timeout of the request and set a new request context with the deadline.
- the timeout filter that times out non-long-running requests should
use the request context as opposed to a fixed 60s wait today.
- admission and storage layer uses the same request context with the
deadline specified.
2020-11-14 11:54:17 -05:00
Kubernetes Prow Robot
d20e3246ba
Merge pull request #96574 from hasheddan/cleanup-resource-tests
Fix test name in e2e resource metrics api test
2020-11-14 05:09:04 -08:00
Kubernetes Prow Robot
b96d8c0eaf
Merge pull request #96516 from andrewsykim/sig-network-api-reviewer
add myself to sig-network-api-reviewers
2020-11-14 03:39:04 -08:00
Edouard Thuleau
e4bd128ec6 Fixes fake client test generation
The test code generation for create subresource was missing the resource
name parameter in the template which caused a compile error for the
sample projects using the scale subresource. That only occurs with
non-namespaced resource kind.
Also re-ran the code generation after applying the fix.
2020-11-14 11:03:50 +01:00
Kubernetes Prow Robot
05d1b94a70
Merge pull request #96317 from Jefftree/test-ssa
Integrate defaults marker to defaulter-gen
2020-11-13 22:35:03 -08:00
Kubernetes Prow Robot
afb2342318
Merge pull request #96266 from chenyw1990/fixcachewacherleak
Fix cacheWatcher leak when time jump to the future and jump back
2020-11-13 20:57:03 -08:00
Kubernetes Prow Robot
36f571404f
Merge pull request #96527 from adtac/apfbeta
promote API priority and fairness types and APIs to beta
2020-11-13 19:33:04 -08:00
Kubernetes Prow Robot
0913f8a54c
Merge pull request #96551 from SergeyKanzhelev/runtimeclassconformance
Test on CRUD operations on RuntimeClasses API
2020-11-13 17:41:04 -08:00
Jefftree
50e7aa49aa Integrate defaults marker and remove ContainerPort defaulter 2020-11-13 17:27:40 -08:00
Antoine Pelisse
89ac376f6b Remove StripDefaults from BuildSwagger 2020-11-13 17:06:36 -08:00
Antoine Pelisse
d3e641e84e Add default for protocol and test that it works 2020-11-13 17:06:35 -08:00
Antoine Pelisse
de4abee3ef Strip defaults in new places 2020-11-13 17:06:35 -08:00
Antoine Pelisse
07a40273eb Re-generate with defaults 2020-11-13 17:06:35 -08:00