Commit Graph

92534 Commits

Author SHA1 Message Date
Rostislav M. Georgiev
d023f3d25d kubeadm: Cleanup and refactor the LoadJoinConfigurationFromFile test
Back in the v1alpha2 days the fuzzer test needed to be disabled. To ensure that
there were no config breaks and everything worked correctly extensive replacement
tests were put in place that functioned as unit tests for the kubeadm config utils
as well.

The fuzzer test has been reenabled for a long time now and there's no need for
these replacements. Hence, over time most of these were disabled, deleted and
refactored. The last remnants are part of the LoadJoinConfigurationFromFile test.

The test data for those old tests remains largely unused today, but it still receives
updates as it contains kubelet's and kube-proxy's component configs. Updates to these
configs are usually done because the maintainers of those need to add a new field.

Hence, to cleanup old code and reduce maintenance burden, the last test that depends
on this test data is finally refactored and cleaned up to represent a simple unit test
of `LoadJoinConfigurationFromFile`.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-07-03 20:00:49 +03:00
Rostislav M. Georgiev
930ca6ceb2 kubeadm: Refactor component config tests
Over the course of recent development of the `componentconfigs` package,
it became evident that most of the tests in this package cannot be implemented without
using a component config. As all of the currently supported component configs are
external to the kubeadm project (kubelet and kube-proxy), practically all of the tests
in this package are now dependent on external code.
This is not desirable, because other component's configs may change frequently and
without much of a notice. In particular many configs add new fields without bumping their
versions. In addition to that, some components may be deprecated in the future and many
tests may use their configs as a place holder of a component config just to test some
common functionality.
To top that, there are many tests that test the same common functionality several times
(for each different component config).

Thus a kubeadm managed replacement and a fake test environment are introduced.
The new test environment uses kubeadm's very own `ClusterConfiguration`.
ClusterConfiguration is normally not managed by the `componentconfigs` package.
It's only used, because of the following:
- It's a versioned API that is under the control of kubeadm maintainers. This enables us to test
  the componentconfigs package more thoroughly without having to have full and always up to date
  knowledge about the config of another component.
- Other components often introduce new fields in their configs without bumping up the config version.
  This, often times, requires that the PR that introduces such new fields to touch kubeadm test code.
  Doing so, requires more work on the part of developers and reviewers. When kubeadm moves out of k/k
  this would allow for more sporadic breaks in kubeadm tests as PRs that merge in k/k and introduce
  new fields won't be able to fix the tests in kubeadm.
- If we implement tests for all common functionality using the config of another component and it gets
  deprecated and/or we stop supporting it in production, we'll have to focus on a massive test refactoring
  or just continue importing this config just for test use.

Thus, to reduce maintenance costs without sacrificing test coverage, we introduce this mini-framework
and set of tests here which replace the normal component configs with a single one (`ClusterConfiguration`)
and test the component config independent logic of this package.

As a result of this, many of the older test cases are refactored and greatly simplified to reflect
on the new change as well. The old tests that are strictly tied to specific component configs
(like the defaulting tests) are left unchanged.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-07-03 20:00:45 +03:00
Kubernetes Prow Robot
a472138c1f
Merge pull request #92724 from chelseychen/event-e2e
Update Event CRUD tests to use events.k8s.io/v1
2020-07-03 07:54:47 -07:00
Kubernetes Prow Robot
d5f76a9c6f
Merge pull request #92764 from sjenning/add-new-kubelet-approvers-to-cmd
add dashpole and sjenning to cmd/kubelet OWNERS
2020-07-03 05:04:21 -07:00
Kubernetes Prow Robot
5da9ba51cd
Merge pull request #92750 from wawa0210/e2e-app-staticcheck
fix test/e2e/apps staticcheck
2020-07-03 05:04:12 -07:00
Kubernetes Prow Robot
af29f81af6
Merge pull request #92740 from SataQiu/deprecate-config-view-20200702
Mark 'kubeadm config view' command as deprecated
2020-07-03 05:04:02 -07:00
Kubernetes Prow Robot
046ac5100e
Merge pull request #92720 from neolit123/1.19-add-kcm-port
kubeadm: add --port=0 for kube-controller-manager and kube-scheduler
2020-07-03 05:03:25 -07:00
Kubernetes Prow Robot
b6cbe1b8de
Merge pull request #92662 from chelseychen/event-api-fallback
Switch event recorder to use events.k8s.io/v1
2020-07-03 05:03:15 -07:00
Kubernetes Prow Robot
19883b50f8
Merge pull request #92604 from soulxu/fix_preemption_with_nominated_node
The Pod is eligible to preempt when previous nominanted node is UnschedulableAndUnresolvable
2020-07-03 05:03:01 -07:00
Kubernetes Prow Robot
a2aaae2dd5
Merge pull request #88124 from rosti/kubeadm-cc-upgrade-plan
kubeadm upgrade plan: print a component config state table
2020-07-03 05:02:47 -07:00
Kubernetes Prow Robot
d7e364ad0f
Merge pull request #92579 from chendave/preemption_topology
Change the exception to avoid the cost of preemption
2020-07-02 23:24:47 -07:00
Dave Chen
3e65fe4378 Change the exception to avoid the cost of preemption
node's labels doesn't contain the required topologyKeys in `Constraints`
cannot be resolved by preempting the pods on that pods.

One use case that could easily reproduce the issue is,
- set `alwaysCheckAllPredicates` to true.
- one node contains all the required topologyKeys but is failed in predicates
  such as 'taint'.
- another node doesn't hold all the required topologyKeys, and thus return `Unschedulable`
  status code.
- scheduler will try to preempt the pods on the above node with lower priorities.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-07-03 10:17:31 +08:00
Kubernetes Prow Robot
36083e4292
Merge pull request #91522 from SataQiu/add-logging-format-flag-20200528
Add '--logging-format' flag to kube-scheduler
2020-07-02 19:04:47 -07:00
SataQiu
2b7af10276 mark 'kubeadm config view' command as deprecated 2020-07-03 09:40:23 +08:00
He Jie Xu
b3741f344e The Pod is eligible to preempt when previous nominanted node is UnschedulableAndUnresolvable
If the Pod's previous nominated node is UnschedulableAndUnresolvable from previous
filtering, it should be considered for preemption again.
2020-07-03 08:57:45 +08:00
Kubernetes Prow Robot
6da40542e7
Merge pull request #92706 from nodo/scheduler-integration-test-add-labels-cleanup
Create nodes with labels instead of adding them later
2020-07-02 17:46:47 -07:00
Kubernetes Prow Robot
47a9952337
Merge pull request #86968 from gnufied/add-extra-csi-fields
Add extra fields in node expansion CSI call
2020-07-02 15:06:47 -07:00
Seth Jennings
b1f91d33e7 add dashpole and sjenning to cmd/kubelet OWNERS 2020-07-02 14:20:41 -05:00
Chelsey Chen
e54ad20f05 Remove DeprecatedSource assignment to avoid validation failure 2020-07-02 14:50:47 -04:00
Chelsey Chen
ade2422883 Switch event recorder to use events.k8s.io/v1 2020-07-02 14:50:41 -04:00
Kubernetes Prow Robot
6cedc0853f
Merge pull request #92691 from zhouya0/change_kubectl_list_option_stdout
Change kubectl label and annotation list option stdout
2020-07-02 06:41:39 -07:00
Kubernetes Prow Robot
7f78c330c0
Merge pull request #92421 from wawa0210/deployment-staticcheck
fix pkg/controller/deployment staticcheck
2020-07-02 06:41:29 -07:00
Kubernetes Prow Robot
c430183fff
Merge pull request #91854 from bsdnet/gci
Update the COS E2E image policy
2020-07-02 06:41:15 -07:00
Kubernetes Prow Robot
dbf6c456a2
Merge pull request #91835 from jingxu97/June/csi
Add csi-proxy installation into node setup script
2020-07-02 06:41:00 -07:00
Kubernetes Prow Robot
13a4a71e99
Merge pull request #91532 from afrouzMashaykhi/log-flag-kubelet
add --logging-format flag to kubelet
2020-07-02 06:40:46 -07:00
Chelsey Chen
b0a0335baf Switch Event CRUD tests to use events.k8s.io/v1 2020-07-02 09:03:36 -04:00
Kubernetes Prow Robot
2fd2d1b911
Merge pull request #92729 from liggitt/fix-root-license
Fix searching for licenses in single-segment modules
2020-07-02 04:18:26 -07:00
Kubernetes Prow Robot
1094c03e15
Merge pull request #92722 from munnerz/bump-md2man
Bump github.com/cpuguy83/go-md2man dependency to v2.0.0
2020-07-02 04:18:16 -07:00
Kubernetes Prow Robot
3f585835d0
Merge pull request #92713 from liggitt/deflake-list-rv-0
Deflake TestListResourceVersion0
2020-07-02 04:18:07 -07:00
Kubernetes Prow Robot
d07095d425
Merge pull request #92711 from alejandrox1/rename-image-prepull-lists
Renamed image "white lists" to pre-pull image lists in test
2020-07-02 04:17:58 -07:00
Kubernetes Prow Robot
f023f5832b
Merge pull request #92705 from pohly/nested-directories-podlogs
e2e pod logs: use hierarchical directory structure
2020-07-02 04:17:48 -07:00
Kubernetes Prow Robot
e37c04bd7c
Merge pull request #92684 from cofyc/volume-scheduling-cleanup
cleanup in volume scheduling
2020-07-02 04:17:38 -07:00
Kubernetes Prow Robot
eee27e8f44
Merge pull request #92652 from rajansandeep/podaffinity
Add back anti-affinity to CoreDNS pods
2020-07-02 04:17:29 -07:00
Kubernetes Prow Robot
15a9430ae5
Merge pull request #92650 from ahg-g/ahg-attempts
breakdown PodSchedulingDuration by number of attempts
2020-07-02 04:17:15 -07:00
Kubernetes Prow Robot
d71a09271c
Merge pull request #92017 from neolit123/1.19-patches
kubeadm: introduce --experimental-patches and deprecate --experimental-kustomize
2020-07-02 04:17:01 -07:00
Kubernetes Prow Robot
1b871091b9
Merge pull request #91645 from chelseychen/event-api
Promote new Event API to v1
2020-07-02 04:16:46 -07:00
wawa0210
9d1948a2f5
fix test/e2e/apps staticcheck 2020-07-02 18:14:12 +08:00
zhouya0
abad08d915 Change kubectl list option stdout 2020-07-02 17:47:55 +08:00
Andrea Nodari
a759fb20ff Create nodes with labels instead of adding them later 2020-07-02 08:56:32 +02:00
Kubernetes Prow Robot
a138be8722
Merge pull request #92686 from pohly/csi-ephemeral-volumes-beta
CSI ephemeral volumes: documentation and owner update
2020-07-01 23:14:37 -07:00
Kubernetes Prow Robot
adf2cd40ae
Merge pull request #92668 from michaelmdresser/fix-kubeup-acls-mb
Fix an unnecessary failure during kube-up during bucket ACL setting and make bucket in the configured project
2020-07-01 23:14:27 -07:00
Kubernetes Prow Robot
f7a13de36c
Merge pull request #92667 from liggitt/admission-warnings
Admission webhook warnings
2020-07-01 23:14:17 -07:00
Kubernetes Prow Robot
94e1c54735
Merge pull request #92655 from BenTheElder/cleanup-some-owners
Cleanup some owners
2020-07-01 23:14:08 -07:00
Kubernetes Prow Robot
4d0ce2e708
Merge pull request #92584 from aojea/ipvsfix
IPVS: kubelet, kube-proxy: unmark packets before masquerading …
2020-07-01 23:13:57 -07:00
Kubernetes Prow Robot
6c917e6e48
Merge pull request #92571 from Huang-Wei/postfilter-impl-5
Polish unit tests of defaultpreemptio plugin
2020-07-01 23:13:47 -07:00
Kubernetes Prow Robot
61342e398e
Merge pull request #92562 from bsdnet/newbranch
Fix sig-node-containerd/containerd-e2e-gci
2020-07-01 23:13:38 -07:00
Kubernetes Prow Robot
bd60f0787e
Merge pull request #92554 from serathius/klog-upgrade
Update k8s.io/klog to v2.2.0
2020-07-01 23:13:27 -07:00
Kubernetes Prow Robot
343995e8e2
Merge pull request #92532 from ii/heyste-get-code-version-test
Create checkServerVersion Test - 1 Endpoint Coverage
2020-07-01 23:13:17 -07:00
Kubernetes Prow Robot
2585d78c79
Merge pull request #92513 from soltysh/client_lock
Add the ability to opt-out from config lock file
2020-07-01 23:13:08 -07:00
Kubernetes Prow Robot
406671910a
Merge pull request #92415 from wawa0210/statefulset-staticcheck
fix pkg/controller/statefulset staticcheck
2020-07-01 23:12:58 -07:00