Commit Graph

113873 Commits

Author SHA1 Message Date
Paweł Banaszewski
0816394e63 Renamed WorkerCount option in node controller to ConcurrentNodeSyncs 2023-02-01 15:35:13 +00:00
Paweł Banaszewski
ceb6a4ebf9 Changed flag name to node-controller-worker-count 2023-02-01 15:35:13 +00:00
Paweł Banaszewski
528f41490c Update staging/src/k8s.io/cloud-provider/options/nodecontroller.go
Co-authored-by: Jiahui Feng <jhf@google.com>
2023-02-01 15:35:13 +00:00
Paweł Banaszewski
446b0051dd Update staging/src/k8s.io/cloud-provider/options/nodecontroller.go
Co-authored-by: Jiahui Feng <jhf@google.com>
2023-02-01 15:35:13 +00:00
Paweł Banaszewski
fea0667c5e Added workerCount flag to cloud controller manager 2023-02-01 15:35:13 +00:00
Kubernetes Prow Robot
b1667918bc
Merge pull request #115424 from songxiao-wang87/runwxs-test11
Make docs more accurate for the contention-profiling flag
2023-02-01 07:25:20 -08:00
Kubernetes Prow Robot
a94caec59c
Merge pull request #114605 from mochizuki875/feature_114546
Fix: Pod terminating stuck because of trying to umount not actual mounted dir
2023-02-01 07:25:08 -08:00
Sarvesh Rangnekar
c791d69b3e Fix the nodeSelector key creation mechanism
Fixes the issue caused when multile ClusterCIDR objects have the same
nodeSelector values, order of the requirements in the nodeSelector is
not preserved when nodeSelector is marshalled and converted to a string.
2023-02-01 13:48:07 +00:00
Sarvesh Rangnekar
9875c1b661 Add integration tests for MultiCIDRRangeAllocator
Adds integration tests for the following scenarios with
MultiCIDRRangeAllocator enabled:
- ClusterCIDR is released when an associated node is deleted.
- ClusterCIDR delete when a node is associated, validate the finalizer
  behavior, make sure that deleted ClusterCIDR is cleaned up after the
  associated node is deleted.
- ClusterCIDR marked as terminating due to deletion must not be used for
  allocating PodCIDRs to new nodes.
- Tie break behavior when multiple ClusterCIDRs are eligible to
  allocate PodCIDRs to a node.
2023-02-01 13:48:07 +00:00
Kubernetes Prow Robot
36450ee422
Merge pull request #115423 from pohly/scheduler-perf-goroutine-leak
scheduler perf: goroutine leak
2023-02-01 04:51:06 -08:00
Patrick Ohly
a7f658e442 test/integration: fix Broadcaster leak
When starting a scheduler, the event broadcaster for it wasn't stopped.
2023-02-01 12:42:50 +01:00
Kubernetes Prow Robot
3a4cef70f2
Merge pull request #115445 from bobbypage/gh-115381
test: Fix node e2e device plugin flake
2023-02-01 02:55:06 -08:00
Kubernetes Prow Robot
bb7c9739a3
Merge pull request #114759 from my-git9/chore/k8staint
chore: add k8s node-role.kubernetes.io/control-plane taint
2023-01-31 21:01:17 -08:00
Kubernetes Prow Robot
51c54a1e2f
Merge pull request #114179 from lixiaobing1/break
improve performance
2023-01-31 21:01:06 -08:00
mantuliu
3f8ada67c5 impove the coverage
Signed-off-by: mantuliu <240951888@qq.com>
2023-02-01 10:47:38 +08:00
David Porter
225658884b test: Fix node e2e device plugin flake
The device plugin test expects that no other pods are running prior to
the test starting. However, it has been observed that in some cases
some resources may still be around from previous tests. This is because
the deletion of resources from other tests is handled by deleting that
test's framework's namespace which is done asynchronously without
waiting for the other test's namespace to be deleted.

As a result, when the node e2e device plugin starts, there may still be
other pods in process of termination. To work around this, add a retry
to the device plugin test to account for the time it takes to delete the
resources from the prior test.

Signed-off-by: David Porter <david@porter.me>
2023-01-31 17:36:10 -08:00
Kubernetes Prow Robot
046595f11f
Merge pull request #115437 from bobbypage/115219-followup
test: Update runtime class detection logic
2023-01-31 17:05:19 -08:00
Kubernetes Prow Robot
39b1ec434e
Merge pull request #115383 from my-git9/imporve/note
Cleanup: improve some note for code
2023-01-31 17:05:07 -08:00
Kubernetes Prow Robot
bd63a912d6
Merge pull request #115349 from danielvegamyhre/job-controller-changes
Update previous succeeded indexes for Indexed jobs unconditionally
2023-01-31 15:51:04 -08:00
Kubernetes Prow Robot
abf8f35356
Merge pull request #113896 from nilekhc/kms-hot-reload-tests
chore: improves tests for hot reload of encryptionconfig
2023-01-31 15:50:53 -08:00
ruiwen-zhao
fabcc91956 Ignore container events with nil PodSandboxStatus
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2023-01-31 22:50:51 +00:00
Elana Hashman
b2882ed8ad
Update generated 2023-01-31 14:28:17 -08:00
David Porter
a3291a87d7 test: Use preloaded busybox image in mirror pod test
Instead of hardcoding the busybox image, use the one that is preloaded
during the test using imageutils.

Signed-off-by: David Porter <david@porter.me>
2023-01-31 13:34:13 -08:00
Kubernetes Prow Robot
c4ebbeeb74
Merge pull request #115428 from aojea/revert_ipam
Revert "Add integration tests for MultiCIDRRangeAllocator"
2023-01-31 12:06:57 -08:00
Kubernetes Prow Robot
58dec1fa4e
Merge pull request #112624 from pacoxu/fix-fsquota-bug
fsquota: only generate pod uuid is nil
2023-01-31 12:06:49 -08:00
David Porter
83652673b6 test: Update runtime class detection logic
In the `NodeSupportsPreconfiguredRuntimeClassHandler`, update the check
for the runtime handler to return a failure if the
`/etc/containerd/config.toml` or `/etc/crio/crio.conf` config files do
not exist. If an error is returned, then the underlying test will be
skipped.

Test manually with starting a kind cluster and moving the containerd
config file and verifying that the test is skipped:

```
$ docker exec -it kind-worker /bin/bash
root@kind-worker:/# mv /etc/containerd/config.toml /etc/containerd/config.toml.bak
```

```
make WHAT="test/e2e/e2e.test"
$ ./_output/bin/e2e.test -kubeconfig /tmp/kubeconfig_kind -ginkgo.focus=".*should run a Pod requesting a RuntimeClass with a configured handler.*" --num-nodes=1 2>&1 -ginkgo.v=1 | tee -i "/tmp/build-log.txt"

[sig-node] RuntimeClass [It] should run a Pod requesting a RuntimeClass with a configured handler [NodeFeature:RuntimeHandler]
test/e2e/common/node/runtimeclass.go:85

  [SKIPPED] Skipping test as node does not have E2E runtime class handler preconfigured in container runtime config: command terminated with exit code 1
```

Signed-off-by: David Porter <david@porter.me>
2023-01-31 11:38:49 -08:00
Daniel Vega-Myhre
2a81337e7c update prev succeeded indexes for indexed jobs unconditionally 2023-01-31 19:15:53 +00:00
Elana Hashman
cdebd88915
Document relationship between requests/limits 2023-01-31 10:33:26 -08:00
Kubernetes Prow Robot
f58f70bd57
Merge pull request #114508 from claudiubelu/unittests-6
unittests: Fixes unit tests for Windows (part 6)
2023-01-31 09:42:49 -08:00
Antonio Ojea
5b22b13f68 Revert "Add integration tests for MultiCIDRRangeAllocator"
This reverts commit 203b91c486.
2023-01-31 17:13:23 +00:00
mantuliu
52e7bf58cf cut avoid unnecessary code duplications
Signed-off-by: mantuliu <240951888@qq.com>
2023-01-31 23:55:09 +08:00
Kubernetes Prow Robot
eaa5104dee
Merge pull request #115214 from ii/create-apiservice-test-v4
Write APIService lifecycle test + 4 Endpoints
2023-01-31 07:38:49 -08:00
Kubernetes Prow Robot
c2299bc65f
Merge pull request #115411 from bobbypage/gh-115380
test: Bump timeout for `runPausePod`
2023-01-31 05:25:02 -08:00
Kubernetes Prow Robot
fb9884577e
Merge pull request #115345 from gnufied/ignore-error-when-unable-find-plugin
Ignore error when we can't find plugin capable of expanding the volum…
2023-01-31 05:24:50 -08:00
Patrick Ohly
222f655062 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-01-31 13:01:39 +01:00
Patrick Ohly
5973e2c8cb e2e pod: unit test for pod status + API error
This covers new behavior in gomega.
2023-01-31 13:01:39 +01:00
Patrick Ohly
901928cd54 e2e pod: remove dead code 2023-01-31 13:01:39 +01:00
Patrick Ohly
f5782f1dbd e2e pod: use gomega.Eventually in WaitForRestartablePods 2023-01-31 13:01:39 +01:00
Patrick Ohly
5d8e970be6 e2e pod: convert ProxyResponseChecker into matcher
Instead of pod responses being printed to the log each time polling fails, we
get a consolidated failure message with all unexpected pod responses if (and
only if) the check times out or a progress report gets produced.
2023-01-31 13:01:39 +01:00
Patrick Ohly
3b579fca91 e2e: consolidate pod response checking
This renames PodsResponding to WaitForPodsResponding for the sake of
consistency and adds a timeout parameter. That is necessary because some other
users of NewProxyResponseChecker used a much lower timeout (2min vs. 15min).

Besides simplifying some code, it also makes it easier to rewrite
ProxyResponseChecker because it only gets used in WaitForPodsResponding.
2023-01-31 13:01:39 +01:00
Patrick Ohly
4491c80074 e2e pod: use gomega.Eventually in WaitForPodNotFoundInNamespace 2023-01-31 13:01:39 +01:00
Patrick Ohly
6eea1b2efa e2e: replace WaitForPodToDisappear with WaitForPodNotFoundInNamespace
WaitForPodToDisappear was always called such that it listed all pods, which
made it less efficient than trying to get just the one pod it was checking for.

Being able to customize the poll interval in practice wasn't useful, therefore
it can be replaced with WaitForPodNotFoundInNamespace.
2023-01-31 13:01:39 +01:00
Claudiu Belu
ec753fcb55 unittests: Fixes unit tests for Windows (part 6)
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- On Windows, consecutive time.Now() calls may return the same timestamp, which would cause
  the TestFreeSpaceRemoveByLeastRecentlyUsed test to flake.
- tests in kuberuntime_container_windows_test.go fail on Nodes that have fewer than 3 CPUs,
  expecting the CPU max set to be more than 100% of available CPUs, which is not possible.
- calls in summary_windows_test.go are missing context.
- filterTerminatedContainerInfoAndAssembleByPodCgroupKey will filter and group container
  information by the Pod cgroup key, if it exists. However, we don't have cgroups on Windows,
  thus we can't make the same assertions.
2023-01-31 11:49:26 +00:00
Kubernetes Prow Robot
f8cb002452
Merge pull request #115291 from sarveshr7/multicidr-tests
Add integration tests for MultiCIDRRangeAllocator
2023-01-31 01:47:00 -08:00
Kubernetes Prow Robot
87759c73eb
Merge pull request #112072 from tkashem/retry-concurrency-test
client-go: add unit test for Request thread safety
2023-01-31 01:46:49 -08:00
songxiao-wang87
3e6b954290 Making a run test.
Signed-off-by: songxiao-wang87 <wang.xiaosong23@zte.com.cn>
2023-01-31 09:38:48 +00:00
Stephen Heywood
27c8184e17 Update Conformance metadata for e2e test 2023-01-31 22:09:42 +13:00
Stephen Heywood
539d0a0f6c Create APIService lifecycle e2e test
The test validates the following endpoints
- deleteApiregistrationV1CollectionAPIService
- patchApiregistrationV1APIServiceStatus
- replaceApiregistrationV1APIService
- replaceApiregistrationV1APIServiceStatus
2023-01-31 20:47:51 +13:00
Patrick Ohly
4740d34edb e2e: consolidate checking a pod list
WaitForPods is now a generic function which lists pods and then checks the pods
that it found against some provided condition. A parameter determines how many
pods must be found resp. match the condition for the check to succeed.
2023-01-31 07:52:26 +01:00
Patrick Ohly
cd0c756c72 e2e pod: use gomega.Eventually in WaitTimeoutForPodReadyInNamespace/WaitForPodCondition
These get converted together because they relied on FinalErr which now isn't
needed anymore.
2023-01-31 07:52:26 +01:00