Commit Graph

125 Commits

Author SHA1 Message Date
Claudiu Belu
862bd63f80 tests: Fixes Windows kubelet-stats test
The test spawns 10 pods with the same pod name, which contains multiple
containers with the same container name. Because of this, the test fails.
This commit addresses this issue.
2020-06-08 20:42:04 -07:00
Vincent Boulineau
3bff11244b
kubelet: fix /stats/summary endpoint on Windows when init-containers are present on the node
Following changes in #87730, Kubelet is directly hcsshim to gather stats.
However, unlike `docker stats` API that was used before, hcsshim does not
keep information about exited containers.

When the Kubelet lists containers (`docker_container.go:ListContainers()`),
it sets `All: true`, retrieving non-running containers.

When docker stats is called with such container id, it'll return a valid JSON
with all values set to 0. The non-running containers are filtered later on in the process.

When the hcsshim is called with such container id, it'll return an error, effectively
stopping the stats retrieval for all containers.
2020-05-04 14:42:02 +02:00
Claudiu Belu
335dc6e2ee Windows tests: Makes gMSA test more nanoserver friendly
Nanoserver does not have powershell. This commit will replace the powershell
command with its cmd equivalent.
2020-04-13 08:05:16 -07:00
张潇
0588958fd3
beta.kubernetes.io/os is already deprecated 2020-03-25 12:57:06 +08:00
Kenichi Omichi
d191660c25 Use e2epod.WaitForPodTerminatedInNamespace directly
WaitForPod*() are just wrapper functions for e2epod package, and they
made an invalid dependency to sub e2e framework from the core framework.
So this replaces WaitForPodTerminated() with the e2epod function.
2020-03-22 17:43:33 +00:00
Kubernetes Prow Robot
a26f50a52e
Merge pull request #86679 from oomichi/remove-invalid-dependency-27
Use e2epod.WaitForPodNameRunningInNamespace directly
2020-03-20 15:58:44 -07:00
Adelina Tuvenie
d7995f3260 Label Windows test as Serial.
Windows test "[sig-windows] [Feature:Windows] Cpu Resources Container
limits should not be exceeded after waiting 2 minutes" should be run
serially to prevent flakyness.
2020-03-18 17:50:36 +01:00
Kenichi Omichi
2c8955fd4a Use e2epod.WaitForPodNameRunningInNamespace directly
WaitForPod*() are just wrapper functions for e2epod package, and they
made an invalid dependency to sub e2e framework from the core framework.
So this replaces WaitForPodRunning() with the e2epod function.
2020-03-17 00:13:14 +00:00
Mike Danese
aaf855c1e6 deref all calls to metav1.NewDeleteOptions that are passed to clients.
This is gross but because NewDeleteOptions is used by various parts of
storage that still pass around pointers, the return type can't be
changed without significant refactoring within the apiserver. I think
this would be good to cleanup, but I want to minimize apiserver side
changes as much as possible in the client signature refactor.
2020-03-05 14:59:46 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Claudiu Belu
c57f20b712 tests: Replaces dnsutils image used with agnhost (part 4)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- dnsutils

dnsmasq is a Linux specific binary. In order for the tests to also
pass on Windows, CoreDNS should be used instead.
2020-02-26 21:51:23 -08:00
Kubernetes Prow Robot
497a998ba6
Merge pull request #88654 from ddebroy/gmsa-disable1
Promote GMSA support for Windows to GA
2020-03-04 02:32:01 -08:00
Deep Debroy
16d221e407 Promote GMSA to GA
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2020-03-04 02:56:21 +00:00
Kubernetes Prow Robot
4838ac95ca
Merge pull request #88624 from claudiubelu/tests/windows-create-pod-fix
tests: Create pod for Windows test
2020-03-02 16:16:46 -08:00
Kubernetes Prow Robot
6c55e4b4f1
Merge pull request #88496 from chewong/fix-memory-limit-test-case
test: don't use hardcoded pod count for memory limit test
2020-03-02 16:16:27 -08:00
Kubernetes Prow Robot
4e4757772f
Merge pull request #88538 from PatrickLang/patch-1
Updating OWNERS for Windows+Azure tests
2020-02-28 02:28:38 -08:00
Kubernetes Prow Robot
16a7650e2b
Merge pull request #86101 from PatrickLang/fix-cpumaximum
Fix cpu resource limit on Windows
2020-02-26 00:20:26 -08:00
Kubernetes Prow Robot
fd5f5cc285
Merge pull request #88471 from claudiubelu/tests/fix-hybrid-network
tests: Fixes Hybrid cluster network test
2020-02-25 18:32:50 -08:00
Patrick Lang
33ef66b927 Updating OWNERS for Windows+Azure tests 2020-02-25 19:56:03 +00:00
Ernest Wong
45d69b3a5a
test: don't use hardcoded pod count for memory limit test 2020-02-24 14:34:51 -08:00
Kubernetes Prow Robot
624da8b9a3
Merge pull request #88110 from fromanirh/refactor-get-current-kubelet-conf
e2e: e2e_node: refactor getCurrentKubeletConfig
2020-02-24 13:11:36 -08:00
Patrick Lang
886214f48c Fix recent context change after rebase 2020-02-24 19:53:25 +00:00
Patrick Lang
63ff616aa8 Adding Windows CPU limit tests 2020-02-24 19:46:39 +00:00
Claudiu Belu
fdec0ee121 tests: Create pod for Windows test
A previous commit (#88471) changed the createTestPod function, but didn't update
the service.go consumer, leading to a pod not being created.
2020-02-23 02:09:14 -08:00
Claudiu Belu
bb0a5ab016 tests: Fixes Hybrid cluster network test
Previously, we've centralized several images into agnhost, including
test-webserver.

The Hybrid cluster network test was using the test-webserver image, and
was updated to use agnhost, but without properly making it so it behaves like
test-webserver, resulting in a failing test.
2020-02-21 04:37:45 -08:00
Kubernetes Prow Robot
937008e3ac
Merge pull request #81226 from claudiubelu/tests/reduce-to-agnhost-part-4
tests: Replaces images used with agnhost (part 4)
2020-02-20 01:13:03 -08:00
Claudiu Belu
f7942290af tests: Replaces images used with agnhost (part 4)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- resource-consumer-controller
- test-webserver
2020-02-18 16:29:49 -08:00
Kubernetes Prow Robot
3d09d25292
Merge pull request #87992 from marosset/windows-kubelet-stats-test-serial
Run Windows kubelet stats e2e tests serially to reduce test flakes
2020-02-16 10:39:27 -08:00
Francesco Romani
bb770c0325 e2e: getCurrentKubeletConfig: move in subpkg
Address review comments and move the helper function
in the `framework/kubelet` package to avoid circular deps
(see https://github.com/kubernetes/kubernetes/issues/81245)

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-14 10:51:08 +01:00
Yu-Ju Hong
bcd975aa65 Replace Beta OS/arch labels with the GA ones
Beta OS/arch labels have been deprecated since 1.14.
This change replaces these labels with the GA ones.
2020-02-13 09:38:51 -08:00
Francesco Romani
08ba240c6b e2e: e2e_node: refactor getCurrentKubeletConfig
this patch moves the helper getCurrentKubeletConfig function,
used in both e2e and e2e_node tests and previously duplicated,
in the common framework.

There are no intended changes in behaviour.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-13 12:53:15 +01:00
marosset
a4d7a67bbd Run Windows kubelet stats e2e tests serially because it needs to start many pods on a single node 2020-02-10 17:56:33 +00:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
marosset
e8f12692df adding e2e test to ensure it takes less than 10 seconds to query kubelet stats for windows nodes 2020-02-06 17:59:05 +00:00
Michael Michael
31df7077e1
Update OWNERS
updating owners/approvers for sig windows to include the two tech leads Deep and Ben
2020-01-31 14:44:55 -06:00
tanjunchen
f3b9a6e12f test/e2e/windows/:Use e2eskipper package 2020-01-11 15:27:54 +08:00
Kubernetes Prow Robot
3c4d2a5215
Merge pull request #78731 from claudiubelu/tests-hostnetwork
Sets HostNetwork to False for tests which do not require it
2019-12-09 15:22:39 -08:00
MorrisLaw
b85adbf1fd moved WriteFileViaContainer and ReadFileViaContainer to kubectl_utils 2019-12-04 20:31:57 +00:00
MorrisLaw
cd8da67b03 move KubectlCmd out of utils into its own package 2019-12-04 20:30:43 +00:00
Claudiu Belu
e465e1089d Sets HostNetwork to False for tests which do not require it
Some tests are setting HostNetwork=true, even if it is not required
for them to pass.

This patch will set the HostNetwork to false for those tests, allowing
them to be run on Windows nodes as well.
2019-11-20 17:36:54 -08:00
tanjunchen
7420faab43 fix-staticcheck in /test/e2e/windows 2019-11-15 09:45:43 +08:00
Kubernetes Prow Robot
b2a2ade1a1
Merge pull request #82878 from adelina-t/fix_82876
Check for terminated reason appropriate for containerD and dockershim
2019-11-13 21:45:49 -08:00
Adelina Tuvenie
3ba4c686a4 Check for terminated reason appropriate for containerD and dockershim
Dockershim and containerD return different reasons for container not
starting. This test should check for both in order to pass on both
runtimes.
2019-11-07 13:34:27 +02:00
Kenichi Omichi
5d6faaddf6 Separate e2enetwork from e2e core framework
networking_utils.go is only for network tests and it is nice to
separate it from the core framework for easy maintenance.
2019-10-25 17:58:20 +00:00
Kubernetes Prow Robot
91627f4962
Merge pull request #83805 from wk8/wk8/gmsa_e2e_tweak
Amending the GMSA e2e test to allow it to run against Windows-only clusters
2019-10-18 21:53:50 -07:00
Dan Winship
52b366457f Add Namespace to e2eservice.TestJig, make all methods use jig namespace and name
Many TestJig methods made the caller pass a serviceName argument, even
though the jig already has a name, and every caller was passing the
same name to each function as they had passed to NewTestJig().

Likewise, many methods made the caller pass a namespace argument, but
only a single test used more than one namespace, and it can easily be
rewritten to use two test jigs as well.
2019-10-18 08:37:19 -04:00
Dan Winship
a0ad420018 Make e2eservice.TestJig methods return errors rather than failing
This is the preferred style for framework methods, and it lets us
write tests to confirm that certain things *don't* work.
2019-10-18 08:36:40 -04:00
Dan Winship
4dcc6229b1 Call jig.SanityCheckService automatically after changes 2019-10-18 08:35:55 -04:00
Jean Rouge
d17624ad82 Amending the GMSA e2e test to allow it to run against Windows-only clusters
e2e Windows tests can be run against Windows-only clusters, which
currently will cause the GMSA test to fail, as it needs to be able to
deploy pods to at least one Linux node, for the GMSA webhook; this patch leverages the new
`--tolerate-master` flag that was added to the GMSA webhook deploy
script in https://github.com/kubernetes-sigs/windows-gmsa/pull/18.

Signed-off-by: Jean Rouge <rougej+github@gmail.com>
2019-10-11 14:16:04 -07:00