Commit Graph

16227 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
3ae1b0ce80
Merge pull request #88234 from fromanirh/topomgr-e2e-tests-multicnt
e2e topology manager: single-numa-node multi container tests
2020-02-20 10:35:56 -08:00
Francesco Romani
64904d0ab8 e2e: topomgr: extend tests to all the policies
Per https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/0035-20190130-topology-manager.md#multi-numa-systems-tests
we validate only the results for single-numa node policy,
because the is no a simple and reliable way to validate
the allocation performed by the other policies.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-20 18:22:34 +01:00
Kubernetes Prow Robot
51e8cafd70
Merge pull request #88353 from roycaihw/deflake/run-crd-test
run_crd_tests: wait for pruned CR to be invisible from API
2020-02-20 03:07:14 -08:00
Francesco Romani
a249b93687 e2e: topomgr: address reviewer comments
Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-20 10:31:09 +01: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
Haowei Cai
aecce98a54 wait for pruned CR to be invisible from API 2020-02-19 17:41:13 -08:00
Kubernetes Prow Robot
96dfa3f605
Merge pull request #88341 from tnqn/flaky-networkpolicy-e2e
NetworkPolicy e2e test should wait for Pod ready
2020-02-19 16:12:11 -08:00
Kubernetes Prow Robot
992aa00a46
Merge pull request #85819 from nan-yu/pdb_e2etest
Add more tests for the pod disruption budget endpoints
2020-02-19 16:11:04 -08:00
Julian V. Modesto
a9ec444d74 Add --dry-run to more kubectl commands.
- delete
- taint
- replace
2020-02-19 17:53:21 -05:00
Kubernetes Prow Robot
d4c5637680
Merge pull request #88200 from liu-cong/benchmark
Make MetricCollector configurable for scheduler benchmark tests
2020-02-19 09:38:26 -08:00
Quan Tian
92759ea642 NetworkPolicy e2e test should wait for Pod ready
The test "should enforce egress policy allowing traffic to a server in a
different namespace based on PodSelector and NamespaceSelector
[Feature:NetworkPolicy]" is flaky because it doesn't wait for the server
Pod to be ready before testing traffic via its service, then even the
NetworkPolicy allows it, the SYN packets will be rejected by iptables
because the service has no endpoints at that moment.

This PR fixes it by making it wait for Pods to be ready like other
tests.
2020-02-20 00:32:12 +08:00
Francesco Romani
833519f80b e2e: topomgr: properly clean up after completion
Due to an oversight, the e2e topology manager tests
were leaking a configmap and a serviceaccount.
This patch ensures a proper cleanup

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:42 +01:00
Francesco Romani
7c12251c7a e2e: topomgr: add multi-container tests
Add tests to check alignment of pods which contains more than one
container.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:42 +01:00
Francesco Romani
8e9d76f1b9 e2e: topomgr: validate all containers in pod
Up until now, the test validated the alignment of resources
only in the first container in a pod. That was just an overlook.
With this patch, we validate all the containers in a given pod.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:42 +01:00
Francesco Romani
ddc18eae67 e2e: topomgr: autodetect NUMA position of VF devs
Add autodetection code to figure out on which NUMA node are
the devices attached to.
This autodetection work under the assumption all the VFs in
the system must be used for the tests.
Should not this be the case, or in general to handle non-trivial
configurations, we keep the annotations mechanism added to the
SRIOV device plugin config map.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:42 +01:00
Francesco Romani
0c2827cb50 e2e: topomgr: remove single-numa node hack
On single-NUMA node systems the numa_node of sriov devices was
sometimes reported as "-1" instead of, say, 0. This makes some
tests that should succeed[0] fail unexpectedly.

The reporting works as expected on real multi-NUMA node systems.

This small workaround was added to handle this corner case,
but it makes overall the code less readable and a bit too lenient,
hence we remove it.

+++

[0] on a single NUMA node system some resources are obviously
always aligned if the pod can be admitted. It boils down to the
node capacity at pod admittal time.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:41 +01:00
Francesco Romani
bb6beb99e5 e2e: topomgr: early check to detect VFs, not PFs
The e2e_node topology_manager check have a early, quick check
to rule out systems without sriov device, thus skipping the tests.

The first version of the ckeck detected PFs, (Physical Functions),
under the assumption that VFs (Virtual Functions) were already been
created. This works because, obviously, you can't have VFs without PFs.

However, it's a little safer and easier to understand if we check
firectly for VFs, bailing out from systems which don't provide them.

Nothing changes for properly configured test systems.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:41 +01:00
Kubernetes Prow Robot
507a2decf9
Merge pull request #88228 from pohly/node-podlog
podlogs: include node name in prefix
2020-02-19 03:28:25 -08:00
Patrick Ohly
0ec85320cf podlogs: include node name in prefix
This is useful for logs from daemonset pods because for those it is
often relevant which node they ran on because they interact with
resources or other pods on the host.

To keep the log prefix short, it gets limited to a maximum length of
10 characters.
2020-02-19 10:10:23 +01:00
Kubernetes Prow Robot
5cf65077ad
Merge pull request #88016 from jsafrane/wait-for-pod-deletion
Delete pod in volume tests
2020-02-18 22:40:38 -08:00
Kubernetes Prow Robot
3a828af963
Merge pull request #88247 from kolyshkin/e2e-node-selinux-fix
test/e2e/node: fix selinux test failure
2020-02-18 20:58:51 -08:00
Kubernetes Prow Robot
cc36dda7e7
Merge pull request #88288 from sbezverk/endpointslice_v1beta1
Switch EndpointSlice e2e test to use discovery v1beta1 api
2020-02-18 19:10:35 -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
5ab1f3464c
Merge pull request #88126 from johnbelamaric/behaviors-readme
Add a README describing behaviors
2020-02-18 14:04:41 -08:00
Kubernetes Prow Robot
1b2a81e6ad
Merge pull request #87578 from Jefftree/bdd-tooling
Add tooling around validation for Behavior Driven Conformance
2020-02-18 14:04:25 -08:00
Cong Liu
7f56c753b3 Make MetricCollector configurable for scheduler benchmark tests 2020-02-18 14:02:57 -08:00
Serguei Bezverkhi
5b7ae34ead Switch EndpointSlice to use discovery v1beta1 api
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-02-18 16:52:21 -05:00
Nan Yu
b757ca16e2 Add more E2E tests for the ../poddisruptionbudgets endpoint 2020-02-18 11:19:30 -08:00
John Belamaric
ca399e6315 Add a README describing behaviors 2020-02-18 09:23:46 -08:00
Kir Kolyshkin
70a2857998 test/e2e/node: fix selinux test failure
Commit 69a473be3 broke the test case (that was checking
that a file from a volume can't be read) by adding a
(wrong) assumption that error should be nil.

Fix the assumption (we do expect the error here).
Note that we were checking file contents before; now when
we check the error from read, checking the contents is
redundant.

The other issue with the test is SELinux should be in enforcing
mode for this to work, so let's check that first to avoid
false positives.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-02-17 09:46:59 -08:00
tanjunchen
119f4df9c5 test/e2e/framework:remove unused code and move const 2020-02-17 23:31:50 +08:00
tanjunchen
9c8d4bedcc test/e2e/framework:remove TODO and make func private 2020-02-17 22:17:54 +08:00
Kubernetes Prow Robot
48def7e7c3
Merge pull request #88105 from Huang-Wei/pts-e2e
Graduate PodTopologySpread to Beta
2020-02-16 18:59:28 -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
53cda47913 update bazel configuration
Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-16 10:07:12 +01:00
Kubernetes Prow Robot
3b22fcc7bd
Merge pull request #88189 from skilxn-go/RemovePreScoreNodeListArguments
[Scheduler Framework]Remove `FilteredNodesStatuses` argument from `PreScore`'s interface
2020-02-15 13:29:28 -08:00
Kubernetes Prow Robot
1c60045db0
Merge pull request #88173 from BenTheElder/gives-a-whole-new-pause
upgrade pause everywhere
2020-02-15 02:11:27 -08:00
skilxn-go
8fd0d8028f Remove FilteredNodesStatuses argument from PreScore interface 2020-02-15 13:53:04 +08:00
Wei Huang
c93dffdfc4
E2E tests for PodTopologySpread 2020-02-14 16:48:35 -08:00
Benjamin Elder
3fb7183215 bump pause to 3.2 in test/ 2020-02-14 14:03:19 -08:00
Kubernetes Prow Robot
d462f80d1b
Merge pull request #88065 from tanjunchen/remove-TODO20200212
test/e2e/framework/:remove TODO and use framework.SingleCallTimeout
2020-02-14 13:11:42 -08:00
Kubernetes Prow Robot
4a45ae3236
Merge pull request #87645 from fromanirh/topomgr-e2e-tests
e2e-topology-manager: single-NUMA-node test
2020-02-14 08:06:19 -08:00
Kubernetes Prow Robot
4e8a7f4a4b
Merge pull request #87355 from mattjmcnaughton/mattjmcnaughton/remove-unnecessary-sudo-from-e2e
Clean up TODO around running test as sudo
2020-02-14 06:10:17 -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
Kubernetes Prow Robot
0e37bcedef
Merge pull request #88144 from gavinfish/crlf-lf
Change line terminators from CRLF to LF
2020-02-13 22:44:43 -08:00
Kubernetes Prow Robot
1e84adb6af
Merge pull request #88139 from BenTheElder/pause-manifest
switch pause to docker manifest instead of manifest-tool
2020-02-13 22:44:30 -08:00
Julian V. Modesto
932500c015 Remove deprecated rolling-update command 2020-02-13 23:52:53 -05:00
Kubernetes Prow Robot
4c08717513
Merge pull request #88143 from Huang-Wei/GetPodsInNamespace-bug
Fix a bug in e2epod function
2020-02-13 19:48:26 -08:00
Kubernetes Prow Robot
12eeb34a6d
Merge pull request #88140 from wongma7/websocket-header
Construct http Request using http.NewRequest
2020-02-13 19:48:17 -08:00
Deepthi Dharwar
3342e4a09a Extend CPUManager e2e tests to run on MultiNUMA node with/without HT 2020-02-14 07:59:13 +05:30
drfish
6e933199c9 Change line terminators from CRLF to LF 2020-02-14 09:55:45 +08:00
Kubernetes Prow Robot
e5524f5f1a
Merge pull request #88099 from cheftako/master
Fix gce-cos-master-reboot test
2020-02-13 16:55:33 -08:00
Kubernetes Prow Robot
b5af3b86ed
Merge pull request #87079 from gavinfish/drfish_typo_resetting
Fix typo from reseting to resetting
2020-02-13 16:54:32 -08:00
Kubernetes Prow Robot
176f74e370
Merge pull request #85909 from tnqn/failing-networkpolicy-test
Fix a failing test in NetworkPolicy e2e
2020-02-13 16:54:18 -08:00
Wei Huang
c83a860e9d
Fix a bug in e2epod function 2020-02-13 16:45:16 -08:00
Matthew Wong
ef8627c95e Construct http Request using http.NewRequest 2020-02-13 23:14:42 +00:00
Benjamin Elder
becc4b7d57 remove unused manifest-tool rules 2020-02-13 14:58:26 -08:00
Kubernetes Prow Robot
97dbf3a844
Merge pull request #88104 from sshukun/fix-impossible-condition
Fix impossible condition in test/e2e/framework/resource_usage_gatherer.go
2020-02-13 14:14:27 -08:00
Kubernetes Prow Robot
cf192e690b
Merge pull request #88096 from gavinfish/ginkgo-skip
Move skip method from e2e fw ginkgowrapper to e2e skipper fw
2020-02-13 14:14:16 -08:00
Kubernetes Prow Robot
35bb71d855
Merge pull request #88092 from yujuhong/rm-beta-labels
Replace Beta OS/arch labels with the GA ones
2020-02-13 14:14:02 -08:00
Kubernetes Prow Robot
98709f9821
Merge pull request #88067 from tanjunchen/remove-TODO-20200212-2
test/e2e/framework/util.go: make function LookForString private
2020-02-13 14:13:52 -08:00
Kubernetes Prow Robot
c98fc1f548
Merge pull request #88053 from liggitt/gc-timeout
Add buffer for GC resync retry to GC e2e tests
2020-02-13 14:13:40 -08:00
Kubernetes Prow Robot
b4db96464b
Merge pull request #88002 from alculquicondor/rm_affinity_weight_2
Remove HardPodAffinitySymmetricWeight from v1alpha2 Component Config
2020-02-13 14:13:25 -08:00
Kubernetes Prow Robot
a53b25ae92
Merge pull request #87923 from ingvagabund/move-direct-prometheus-metrics-under-component-base-metrics
Collect some of scheduling metrics and scheduling throughput (vol. 2)
2020-02-13 14:13:11 -08: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
tanjunchen
efec7e64ce remove TODO and use framework.SingleCallTimeout 2020-02-14 01:12:46 +08:00
Aldo Culquicondor
99bda6fac0 Remove HardPodAffinityWeight from v1alpha2
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-13 11:59:56 -05:00
Quan Tian
55b687054d Fix updated pod NetworkPolicy e2e test
The test "should allow ingress access from updated pod" fails regardless
of which CNI plugin is enabled. It's because the test assumes the client
Pod can recheck connectivity after updating its label, but the client
won't restart after the first failure, so the second check will always
fail. The PR creates a client Pod with OnFailure RestartPolicy to fix it.

In addition to the above test that checks rule selector takes effect on
updated client pod, the PR adds a test "should deny ingress access to
updated pod" to ensure network policy selector can take effect on updated
server pod.
2020-02-14 00:12:19 +08:00
Jan Chaloupka
7b5534021c Collect some of scheduling metrics and scheduling throughput
In addition to getting overall performance measurements from golang benchmark,
collect metrics that provides information about insides of the scheduler itself.
This is a first step towards improving what we collect about the scheduler.

Metrics in question:
- scheduler_scheduling_algorithm_predicate_evaluation_seconds
- scheduler_scheduling_algorithm_priority_evaluation_seconds
- scheduler_binding_duration_seconds
- scheduler_e2e_scheduling_duration_seconds

Scheduling throughput is computed on the fly inside perfScheduling.
2020-02-13 13:32:09 +01:00
tanjunchen
15bc88785a test/e2e/framework/util.go:make function LookForString private 2020-02-13 20:29:27 +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
Kubernetes Prow Robot
8ca96f3e07
Merge pull request #80724 from cceckman/provider-info-e2e
Provide OIDC discovery for service account token issuer
2020-02-13 01:38:35 -08:00
Maciej Borsz
c78c0e949d Remove unnecessary calls to GCE API after PD is created. 2020-02-13 09:57:25 +01:00
Jan Safranek
528adbefe4 Remove client cleanup from TestCleanup
All tests remove the test client pod, usually in TestVolumeClient.
Rename TestCleanup to TestServerCleanup.
In addition, remove few calls to Test(Server)Cleanup that do not do anything
useful (server pod is not used in these tests).
2020-02-13 09:55:53 +01:00
Shukun
7f9e228bd7 Fix impossible condition in test/e2e/framework/resource_usage_gatherer.go 2020-02-13 16:13:19 +09:00
Kubernetes Prow Robot
fb6f5d739b
Merge pull request #88070 from sshukun/remove-tautological-condition
Remove tautological condition in test/e2e/framework/pod/resource.go
2020-02-12 21:37:35 -08:00
Kubernetes Prow Robot
f0c14f291f
Merge pull request #87751 from skilxn-go/Rename
[Scheduler Framework] Rename `PostFilter` plugin to `PreScore`
2020-02-12 21:37:12 -08:00
Kubernetes Prow Robot
a11a8b8691
Merge pull request #87714 from julianvmodesto/use-kubectl-ss-dry-run-flag
Use --dry-run=server in kubectl commands
2020-02-12 21:36:57 -08:00
Kubernetes Prow Robot
1aa21639cf
Merge pull request #88064 from wongma7/webhook-header
Initialize http Request Header before RoundTrip to avoid panic
2020-02-12 19:54:35 -08:00
Kubernetes Prow Robot
4ab8c5393f
Merge pull request #88059 from msau42/refactor-e2e-node-selection
Refactor e2e node selection
2020-02-12 17:54:58 -08:00
Julian V. Modesto
13b80b48cd Use --dry-run=client,server in kubectl.
- Support --dry-run=server for subcommands apply, run, create, annotate,
expose, patch, label, autoscale, apply set-last-applied, drain, rollout undo
- Support --dry-run=server for set subcommands
  - image
  - resources
  - serviceaccount
  - selector
  - env
  - subject
- Support --dry-run=server for create subcommands.
  - clusterrole
  - clusterrolebinding
  - configmap
  - cronjob
  - job
  - deployment
  - namespace
  - poddisruptionbudget
  - priorityclass
  - quota
  - role
  - rolebinding
  - service
  - secret
  - serviceaccount
- Remove GetClientSideDryRun
2020-02-12 20:46:54 -05:00
Walter Fender
e8f67d122f Fix gce-cos-master-reboot test
Adding additional steps to network restart to ensure it restarts.
Also directing output to serial port to make the test debuggable.
2020-02-12 17:07:41 -08:00
drfish
5782d616f2 Move skip method from e2e fw ginkgowrapper to e2e skipper fw 2020-02-13 06:25:43 +08:00
skilxn-go
f5b7e3cca3 Rename PostFilter plugin to PreScore 2020-02-12 23:25:08 +08:00
Kubernetes Prow Robot
460fdc7f48
Merge pull request #87057 from oomichi/add-debugging-msg-issue86678
Add logs of port-forward-tester pod
2020-02-12 05:22:51 -08:00
Shukun
0421b40d79 Remove tautological condition in test/e2e/framework/pod/resource.go 2020-02-12 20:49:24 +09:00
Kubernetes Prow Robot
9f58fb790c
Merge pull request #88033 from dims/avoid-running-docker-specific-test-in-containerd
Avoid running docker specific test in containerd
2020-02-11 23:16:33 -08:00
Kubernetes Prow Robot
6c074f819c
Merge pull request #88003 from misterikkit/vsphere-tags
Add missing tag to vSphere storage E2E tests
2020-02-11 23:15:44 -08:00
Kubernetes Prow Robot
8f07f3a156
Merge pull request #87943 from tanjunchen/move-funcs001
test/e2e/framework:move functions to test/e2e/scheduling/
2020-02-11 23:15:34 -08:00
Kubernetes Prow Robot
c9d4257cbc
Merge pull request #87819 from mortent/SerialFlakyPDBTests
Make DisruptionController eviction tests serial to avoid flakes
2020-02-11 23:14:55 -08:00
Kubernetes Prow Robot
52fb02fdbe
Merge pull request #87718 from wojtek-t/kubelet_not_watching_immutable_secret_configmaps
WatchBasedManager stops  watching immutable objects
2020-02-11 23:14:33 -08:00
Matthew Wong
c048fb19fc Initialize http Request Header before RoundTrip to avoid panic 2020-02-12 06:55:37 +00:00
Michelle Au
d9184b75c9 Convert volume.TestConfig to use NodeSelection
Change-Id: I6adbb53b65e4a4f7e220fc0d91a26dc6bc135c36
2020-02-11 21:13:42 -08:00
Michelle Au
76a4a34dae Pass NodeSelection directly into e2e testsuites so that tests can use them more consistently
Change-Id: I99c8c1d8535a2a2319fbe8216b953c14a56f2763
2020-02-11 20:25:24 -08:00
Jordan Liggitt
242e3ebf01 Add buffer for GC resync retry to GC e2e tests 2020-02-11 22:31:09 -05:00
Michelle Au
fb9f02b5e1 Don't set NodeName directly in Pods so that it still goes through the scheduler
Change-Id: I244b6aac0289a13339f3ac228c4ad9ecf8c07b42
2020-02-11 19:17:41 -08:00
Charles Eckman
5a176ac772 Provide OIDC discovery endpoints
- Add handlers for service account issuer metadata.
- Add option to manually override JWKS URI.
- Add unit and integration tests.
- Add a separate ServiceAccountIssuerDiscovery feature gate.

Additional notes:
- If not explicitly overridden, the JWKS URI will be based on
  the API server's external address and port.

- The metadata server is configured with the validating key set rather
than the signing key set. This allows for key rotation because tokens
can still be validated by the keys exposed in the JWKs URL, even if the
signing key has been rotated (note this may still be a short window if
tokens have short lifetimes).

- The trust model of OIDC discovery requires that the relying party
fetch the issuer metadata via HTTPS; the trust of the issuer metadata
comes from the server presenting a TLS certificate with a trust chain
back to the from the relying party's root(s) of trust. For tests, we use
a local issuer (https://kubernetes.default.svc) for the certificate
so that workloads within the cluster can authenticate it when fetching
OIDC metadata. An API server cannot validly claim https://kubernetes.io,
but within the cluster, it is the authority for kubernetes.default.svc,
according to the in-cluster config.

Co-authored-by: Michael Taufen <mtaufen@google.com>
2020-02-11 16:23:31 -08:00
Davanum Srinivas
f26dbc473d
Avoid running docker specific test in containerd 2020-02-11 14:32:18 -05:00
Jan Safranek
2430c48c10 Delete pod in volume tests
All storage e2e tests should delete pods they use so we can identify issues
on volume cleanup easily.
2020-02-11 12:54:38 +01:00
Kubernetes Prow Robot
dc8208dddc
Merge pull request #87871 from msau42/fix-hostexec
Use NodeSelector instead of NodeName in hostexec Pod
2020-02-10 20:44:01 -08:00