Commit Graph

88771 Commits

Author SHA1 Message Date
Benjamin Elder
86ead63158 update golang.org/x/crypto 2020-02-20 13:17:51 -08:00
Kir Kolyshkin
78e98da1db test/e2e/framework/log: optimize PrunedStack()
Use bytes instead of strings, and slice in-place filter
(see https://github.com/golang/go/wiki/SliceTricks#filter-in-place)
to avoid copying strings around.

In my benchmark it shows almost 2x improvement:

BenchmarkString-8    	 1477207	     10198 ns/op
BenchmarkBuffer-8    	 1561291	      7622 ns/op
BenchmarkInPlace-8   	 2295714	      5202 ns/op

String is the original implementation, Buffer is an intermediary
one that uses strings.Builder, and InPlace is the one from this commit.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-02-20 12:58:26 -08:00
Jefftree
d798ccbba1 Add tests for egress selector 2020-02-20 12:45:55 -08:00
Kubernetes Prow Robot
afa72e93cd
Merge pull request #88149 from yue9944882/feat/flow-control-ob
Flowcontrol Obserbiliity: Add FS/PL UIDs into response headers
2020-02-20 12:31:58 -08:00
Abhishek Raut
a980a1fa24 Add e2e test to test Except clause in NetworkPolicy
Add a new e2e test to test the Except clauses in IPBlock CIDR
based NetworkPolicies. This test adds an egress rule which
allows client to connect to a CIDR which includes the
ServerPod's IP, however carves an except subnet which excludes
this ServerPod.
2020-02-20 11:32:00 -08:00
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
Jefftree
907ab25b6f vendor network proxy client 2020-02-20 10:19:38 -08:00
Jefftree
55b89a6451 Support empty root CA for konnectivity 2020-02-20 10:19:38 -08:00
Jefftree
725d2b6a8f Network Proxy: GRPC + HTTP Connect with UDS 2020-02-20 10:19:37 -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
8fb66ae965
Merge pull request #88319 from ZeroMagic/azuredisk_fake_test
Export Azure Fake Cloud for reusing
2020-02-20 08:27:08 -08:00
mattjmcnaughton
bdc4e2fd17
Support injecting errors for FakeImageService
We want `FakeImageService` to support injecting errors similar to
`FakeRuntimeService`. These injected errors will be returned on the next
call to the given function.

We will use the ability to inject errors to more thoroughly test
the image management component of the KubeRuntimeManager.
2020-02-20 10:09:56 -05:00
Janek Łukaszewicz
c43b940586 log-dump.sh: allow to dump extra log files
Supports both method: logexporter and ssh
2020-02-20 14:58:18 +01:00
Kubernetes Prow Robot
58596b2bf5
Merge pull request #88347 from neolit123/1.18-kubeadm-update-constants
kubeadm: update constants for 1.18
2020-02-20 04:29:43 -08:00
Kubernetes Prow Robot
cda2f5dfe5
Merge pull request #86603 from npu21/doc/kustomize
update defaultconfig link
2020-02-20 04:29:31 -08:00
Kubernetes Prow Robot
d0983b562d
Merge pull request #84731 from verb/ec-pid
Add namespace targeting mode to CRI and kubelet
2020-02-20 04:29:17 -08:00
Kubernetes Prow Robot
79b674d827
Merge pull request #84381 from Sh4d1/egress_selector_proxy_v2
Use network proxy for proxy subresources
2020-02-20 04:29:03 -08:00
Ed Bartosh
03ecc20b19 empty_dir: Check if hugetlbfs volume is mounted with a correct pagesize
Extended GetMountMedium function to check if hugetlbfs volume
is mounted with the page size equal to the medium size.

Page size is obtained from the 'pagesize' mount option of the
mounted hugetlbfs volume.
2020-02-20 13:57:36 +02:00
Rafael Fernández López
3e59a0651f
kubeadm: optimize the upgrade path from ClusterStatus to annotations
When doing the very first upgrade from a cluster that contains the
source of truth in the ClusterStatus struct, the new kubeadm logic
will try to retrieve this information from annotations.

This changeset adds to both etcd and apiserver endpoint retrieval the
special case in which they won't retry if we are in such cases. The
logic will retry if we find any unknown error, but will not retry in
the following cases:

- etcd annotations do not contain etcd endpoints, but the overall list
  of etcd pods is greater than 0. This means that we listed at least
  one etcd pod, but they are missing the annotation.

- API server annotation is not found on the api server pod for a given
  node name, but no errors aside from that one were found. This means
  that the API server pod is present, but is missing the annotation.

In both cases there is no point in retrying, and so, this speeds up the
upgrade path when coming from a previous existing cluster.
2020-02-20 12:19:05 +01:00
Rafael Fernández López
b140c5d64b
kubeadm: remove ClusterStatus dependency
While `ClusterStatus` will be maintained and uploaded, it won't be
used by the internal `kubeadm` logic in order to determine the etcd
endpoints anymore.

The only exception is during the first upgrade cycle (`kubeadm upgrade
apply`, `kubeadm upgrade node`), in which we will fallback to the
ClusterStatus to let the upgrade path add the required annotations to
the newly created static pods.
2020-02-20 12:18:56 +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
Kubernetes Prow Robot
09d78529db
Merge pull request #87792 from ksubrmnn/nodeip
Allow access to default Kubernetes Service from inside Windows Pod (Overlay)
2020-02-20 03:07:04 -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
andyzhangx
44e6a506b9 fix: check disk status before disk azure disk 2020-02-20 07:26:43 +00:00
Taesun Lee
97fc3e6139
Fix typos in apiclient util
fix initalTimeout to initialTimeout
2020-02-20 15:20:04 +09:00
s-ito-ts
e6b9a7a309 Fix golint errors in pkg/controller/garbagecollector 2020-02-20 04:46:02 +00:00
Haowei Cai
aecce98a54 wait for pruned CR to be invisible from API 2020-02-19 17:41:13 -08:00
ZeroMagic
e2c733a702 test: export a fake Azure cloud
Via the exported GetTestCloud(), we can reuse the code for the unit tests in Azure related CSI drivers.

Signed-off-by: ZeroMagic <anthonyliu@zju.edu.cn>
2020-02-20 00:23:24 +00: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
f116308403
Merge pull request #88331 from skilxn-go/FixSchedulerTestDataRace
fix data races in scheduler unit tests
2020-02-19 16:11:56 -08:00
Kubernetes Prow Robot
343ccdebdb
Merge pull request #88313 from zhouya0/optimize_kubectl_version_help_info
Optimize kubectl version help info
2020-02-19 16:11:45 -08:00
Kubernetes Prow Robot
c3db17f22c
Merge pull request #88311 from yue9944882/chore/refactor-metrics
Homogenize PF metrics naming
2020-02-19 16:11:35 -08:00
Kubernetes Prow Robot
224aca4e01
Merge pull request #88251 from kublr/fix/kubelet-systemd-reservation
Partially fix incorrect configuration of kubepods.slice unit by kubelet
2020-02-19 16:11:25 -08:00
Kubernetes Prow Robot
fd95a019a1
Merge pull request #87550 from ricochet/doc/godep-kubectl
Remove doc reference to godep #782
2020-02-19 16:11:18 -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
da9f47eadf
Merge pull request #88146 from gnufied/avoid-multiple-pv-delete
Prevent deletion of PVs that are already deleted
2020-02-19 12:40:48 -08:00
Lubomir I. Ivanov
ad8bf3c139 kubeadm: do not pin unit tests to a version 2020-02-19 22:20:33 +02:00
Lubomir I. Ivanov
22319019ab kubeadm: update constants for 1.18
- Include 1.19 as a supported etcd mapping.
- Update minimum and current versions.
2020-02-19 21:40:46 +02:00
Tim Allclair
98ad7416fa Start deprecation process for StreamingProxyRedirects 2020-02-19 10:53:45 -08:00
Jiahui Feng
fdd7424d19 add logging for csr being approved and issued. 2020-02-19 10:26:59 -08: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
skilxn-go
74718adf10 fix data races for other usage of Q 2020-02-20 00:50:13 +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