Commit Graph

74656 Commits

Author SHA1 Message Date
Patrick Ohly
54d8f1648f e2e/storage: improve PV checking
TestDynamicProvisioning had multiple ways of choosing additional
checks:
- the PvCheck callback
- the builtin write/read check controlled by a boolean
- the snapshot testing

Complicating matters further, that builtin write/read test had been
more customizable with new fields `NodeSelector` and
`ExpectUnschedulable` which were only set by one particular test (see
https://github.com/kubernetes/kubernetes/pull/70941).

That is confusing and will only get more confusing when adding more
checks in the future. Therefore the write/read check is now a separate
function that must be enabled explicitly by tests that want to run it.
The snapshot checking is also defined only for the snapshot test.

The test that expects unschedulable pods now also checks for that
particular situation itself. Instead of testing it with two pods (the
behavior from the write/read check) that both fail to start, only a
single unschedulable pod is created.

Because node name, node selector and the `ExpectUnschedulable` were
only used for checking, it is possible to simplify `StorageClassTest`
by removing all of these fields.

Expect(err).NotTo(HaveOccurred()) is an anti-pattern in Ginkgo testing
because a test failure doesn't explain what failed (see
https://github.com/kubernetes/kubernetes/issues/34059). We avoid it
now by making the check function itself responsible for checking
errors and including more information in those checks.
2019-02-09 14:20:17 +01:00
Patrick Ohly
5b8826b610 e2e/storage: use different names for test pods
When the provisioning test gets stuck, the log fills up with messages
about waiting for a certain pod to run. Now the pod names are
pvc-[volume-tester|snapshot]-[writer|reader] plus the random
number appended by Kubernetes. This makes it easier to see where the
test is stuck.
2019-02-09 14:20:17 +01:00
Patrick Ohly
e92bdd14cc e2e/storage: remove unnecessary empty string checks
There is no need to check for empty strings, we can also directly
initialize structs with the value. The end result is the same when the
value is empty (empty string in the struct).
2019-02-09 14:20:17 +01:00
Patrick Ohly
315266b25e e2e: refine snapshot test
This addresses the two remaining change requests from
https://github.com/kubernetes/kubernetes/pull/69036:
- replace "csi-hostpath-v0" name check with capability
  check (cleaner that way)
- add feature tag to "should create snapshot with defaults" because
  that is an alpha feature

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2019-02-09 14:20:17 +01:00
Patrick Ohly
f8536e8e42 e2e: fix snapshot skip test
Even if snapshots are supported by the driver interface, the driver or
suite might still want to skip a particular test, so those checks
still need to be executed.
2019-02-09 14:19:37 +01:00
Andrew Kim
6d90f52f15 add unit tests for volume rounding helpers 2019-02-09 01:16:55 -05:00
Andrew Kim
a62ee8b0a9 clean up volume rounding functions and move to k8s.io/cloud-provider/volume 2019-02-09 01:16:55 -05:00
Andrew Kim
ca6a051b00 remove cloud provider dependencies to pkg/volume
Co-authored-by: Weibin Lin <linweibin1@huawei.com>
2019-02-09 01:16:55 -05:00
Kubernetes Prow Robot
40a4c1f723
Merge pull request #73854 from RajatVaryani/master
Fix linting in cmd/kubemark package
2019-02-08 22:00:24 -08:00
Kubernetes Prow Robot
ee44e24cd3
Merge pull request #73659 from feiskyer/usage-nano-cores
Kubelet: add usageNanoCores from CRI stats provider
2019-02-08 19:26:21 -08:00
Chao Xu
e90409d735 add integration test 2019-02-08 16:15:43 -08:00
Kubernetes Prow Robot
2a664f4820
Merge pull request #73213 from danielqsj/nodeapi
fix shellcheck in node-api
2019-02-08 13:14:25 -08:00
Kubernetes Prow Robot
37a402a3bc
Merge pull request #72806 from zgfh/patch-3
fix typo "udp" -> "UDP"
2019-02-08 13:14:15 -08:00
Kubernetes Prow Robot
8f7ccf8d4c
Merge pull request #69036 from wackxu/snapshottest
add e2e test for snapshot
2019-02-08 13:14:04 -08:00
Kubernetes Prow Robot
52b3956df4
Merge pull request #67638 from houjun41544/20180821
Fix fmt.Errorf messages
2019-02-08 13:13:49 -08:00
Kubernetes Prow Robot
fd633d192f
Merge pull request #73845 from wojtek-t/fix_watcher_going_back_in_time
Avoid going back in time in watchcache watchers
2019-02-08 11:54:12 -08:00
Kubernetes Prow Robot
834c9a5e3d
Merge pull request #72491 from liggitt/delegated-auth-permissions
Ensure controller manager and scheduler can perform delegated auth checks
2019-02-08 11:53:52 -08:00
Yu Liao
fa6699dc4d there could be existing resource quotas, count them first and check the
expected is the existing + 1
2019-02-08 11:35:56 -08:00
Michelle Au
ddc1a9c8c8 add msau42 to approvers for volume e2es 2019-02-08 11:34:02 -08:00
Kubernetes Prow Robot
5b7a790d35
Merge pull request #72185 from dcbw/owners-label-sig-network
OWNERS: add label:sig/network to a bunch of places
2019-02-08 10:36:16 -08:00
Kubernetes Prow Robot
54a578d3a1
Merge pull request #72012 from yeya24/patch-1
fix typos lable -> label
2019-02-08 10:36:05 -08:00
Lubomir I. Ivanov
3b3b79fe2c autogenerated bazel 2019-02-08 19:31:22 +02:00
Lubomir I. Ivanov
1d032c40d3 kubeadm: add a preflight check for Docker and cgroup driver
systemd is the recommended driver as per the setup of running
the kubelet using systemd as the init system. Add a preflight
check that throws a warning if this isn't the case.
2019-02-08 19:31:22 +02:00
Kubernetes Prow Robot
5bedff6625
Merge pull request #73836 from Random-Liu/clarify-hostname-in-cri
Clarify hostname emptiness in CRI.
2019-02-08 09:06:27 -08:00
Kubernetes Prow Robot
f0b72df47e
Merge pull request #73789 from vladimirvivien/volume-plugin-can-attach
AttachableVolumePlugin CanAttach() method for attachable check
2019-02-08 09:06:17 -08:00
Kubernetes Prow Robot
04c86beeb6
Merge pull request #73693 from amandahla/iss68231
Update doc.go import for staging/src/k8s.io/api/storage/v1/doc.go
2019-02-08 09:06:07 -08:00
Kubernetes Prow Robot
b50c643be0
Merge pull request #73540 from rlenferink/patch-5
Updated OWNERS files to include link to docs
2019-02-08 09:05:56 -08:00
Jordan Liggitt
4212a9a05a Ensure controller manager and scheduler can perform delegated auth checks 2019-02-08 11:15:52 -05:00
Rajat Varyani
17fd66946b Fix linting in cmd/kubemark package 2019-02-08 21:30:34 +05:30
wojtekt
1b436f1a2f Avoid going back in time in watchcache watchers 2019-02-08 15:56:22 +01:00
Kubernetes Prow Robot
395e4c05ba
Merge pull request #73745 from rosti/refactor-JoinConfigFileAndDefaultsToInternalConfig
kubeadm: refactor JoinConfigFileAndDefaultsToInternalConfig
2019-02-08 06:54:16 -08:00
Kubernetes Prow Robot
30397a3d23
Merge pull request #73219 from danielqsj/csi-api
fix shellcheck in csi-api
2019-02-08 06:53:52 -08:00
Kubernetes Prow Robot
26af19b3a4
Merge pull request #73846 from wojtek-t/avoid_sync_pool
Reduce contention in cacher by eliminating sync.Pool
2019-02-08 05:05:02 -08:00
Vladimir Vivien
0a653b3b80 Adds method CanAttach() to check plugin attachability 2019-02-08 08:04:15 -05:00
wojtekt
0a0835e92d Add metric exposing amount of processed init events in watchcache 2019-02-08 13:03:33 +01:00
Rostislav M. Georgiev
09f753a94c kubeadm: refactor JoinConfigFileAndDefaultsToInternalConfig
Currently JoinConfigFileAndDefaultsToInternalConfig is doing a couple of
different things depending on its parameters. It:

- loads a versioned JoinConfiguration from an YAML file.
- returns defaulted JoinConfiguration allowing for some overrides.

In order to make code more manageable, the following steps are taken:

- Introduce LoadJoinConfigurationFromFile, which loads a versioned
  JoinConfiguration from an YAML file, defaults it (both dynamically and
  statically), converts it to internal JoinConfiguration and validates it.

- Introduce DefaultedJoinConfiguration, which returns defaulted (both
  dynamically and statically) and verified internal JoinConfiguration.
  The possibility of overwriting defaults via versioned JoinConfiguration is
  retained.

- Re-implement JoinConfigFileAndDefaultsToInternalConfig to use
  LoadJoinConfigurationFromFile and DefaultedJoinConfiguration.

- Replace some calls to JoinConfigFileAndDefaultsToInternalConfig with calls to
  either LoadJoinConfigurationFromFile or DefaultedJoinConfiguration where
  appropriate.

- Rename JoinConfigFileAndDefaultsToInternalConfig to the more appropriate name
  LoadOrDefaultJoinConfiguration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-08 14:00:02 +02:00
wojtekt
c121632360 Reduce Pool contention in cacher 2019-02-08 12:55:28 +01:00
Kubernetes Prow Robot
999e2e0ce8
Merge pull request #73581 from krzysied/test_KUBE_JUNIT_REPORT_DIR_revert
KUBE_JUNIT_REPORT_DIR fixes
2019-02-08 02:39:14 -08:00
Dmitry Rozhkov
6ac76f9859 kubeadm: restructure upgradeVariables 2019-02-08 11:45:33 +02:00
Kubernetes Prow Robot
836ce9fdc1
Merge pull request #65636 from juanvallejo/jvallejo/fix-local-panic
fix --local panic in set commands
2019-02-07 20:56:25 -08:00
Kubernetes Prow Robot
a7966022d7
Merge pull request #73714 from tallclair/debian-base
Bump debian-* base image versions to latest
2019-02-07 19:44:44 -08:00
Kubernetes Prow Robot
eac19a3ab9
Merge pull request #73616 from dims/move-part-of-kubelet-apis-well-known-lables
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
2019-02-07 19:44:34 -08:00
Lantao Liu
5b86ee1c82 Clarify hostname emptiness in CRI. 2019-02-07 18:37:59 -08:00
Kubernetes Prow Robot
92db54cc53
Merge pull request #73335 from oomichi/cleanup-hack
Add check-file-in-alphabetical-order for cleanup
2019-02-07 18:24:41 -08:00
Kubernetes Prow Robot
2fd8f8aec1
Merge pull request #73812 from Adirio/patch-2
ControllerRef creation through factory function
2019-02-07 17:12:20 -08:00
Kubernetes Prow Robot
af17925f68
Merge pull request #73594 from masterzen/bugfix/73479-nlb-target-groups-tags
Fix #73479 AWS NLB target groups missing tags
2019-02-07 17:12:10 -08:00
Lantao Liu
1a92e218e0 Remove unused function from the legacy runtime interface.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-02-07 16:57:19 -08:00
Kubernetes Prow Robot
0b224c4b5f
Merge pull request #73823 from jiayingz/cuda10-test
Update CudaVectorAdd test image to be built with Cuda10 docker image.
2019-02-07 15:50:08 -08:00
Kubernetes Prow Robot
7d1dc61920
Merge pull request #73678 from ereslibre/do-not-create-etcd-datadir-dryrun
kubeadm: do not create etcd datastore if we are in dryrun mode
2019-02-07 15:49:53 -08:00
juanvallejo
e8df247597
fix --local panic in set commands 2019-02-07 16:56:32 -05:00