Commit Graph

99156 Commits

Author SHA1 Message Date
fengzixu
edc1c62471 feature: add CSIVolumeHealth feature and gate
1. add EventRecorder to ResourceAnalyzer
2. add CSIVolumeHealth feature and gate
2021-03-10 01:16:37 +09:00
Kubernetes Prow Robot
97e2c84057
Merge pull request #96963 from bl-ue/96919-kubectl-describe-node-age-col
Fix case of Age column in kubectl describe node
2021-03-09 08:09:00 -08:00
Ryan Phillips
089d8dda12 add duration encoder to structured logger 2021-03-09 09:50:24 -06:00
Morten Torkildsen
66e722765a Update e2e tests to use the policy v1 api 2021-03-09 10:29:11 -05:00
Morten Torkildsen
621aed4d32 generated 2021-03-09 10:29:11 -05:00
Morten Torkildsen
21fba79d45 Promote PDBs to GA 2021-03-09 10:29:11 -05:00
drfish
c2ceb21a3e Make parallelism as part of schedulerOptions 2021-03-09 23:25:55 +08:00
Joe Betz
24f95667bf Migrate clusterroleaggregation controller to apply 2021-03-09 07:15:14 -08:00
Kubernetes Prow Robot
bc13a38367
Merge pull request #99980 from BenTheElder/cleanup-unused-3p
remove unused third_party/intemp
2021-03-09 06:35:12 -08:00
Kubernetes Prow Robot
7c57489f84
Merge pull request #99297 from chendave/testonly
Move test specific option setting to the test file
2021-03-09 06:35:00 -08:00
David Eads
fa03dee68c provide directly decodable versions for storageversion API 2021-03-09 08:36:32 -05:00
Maciej Szulik
a68582d608
Fix batch/v1 CronJob support in create, describe and polymorphichelpers 2021-03-09 14:33:56 +01:00
Kubernetes Prow Robot
8a8c267e58
Merge pull request #98191 from cmluciano/cml/signetown
network: Self nominate cmluciano approver for sig-network
2021-03-09 05:32:59 -08:00
Artyom Lukianov
0370768650 Pass cpuset.mems to the dockershim during container creation
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-03-09 14:29:12 +02:00
Kubernetes Prow Robot
a56fa34d6b
Merge pull request #99942 from jsafrane/refactor-migration-featuregates
Refactor CSI migration plugin manager to get featureGates as a parameter
2021-03-09 04:27:46 -08:00
Kubernetes Prow Robot
16e9c682ff
Merge pull request #99495 from wojtek-t/cleanup_describe_8
Move ownership of core events test to sig-instrumentation
2021-03-09 04:27:38 -08:00
Kubernetes Prow Robot
4d969ac90d
Merge pull request #99257 from chenyw1990/fixedLogFormatJsonPanic
fix json log format panic, change the flag name in flagIsSet
2021-03-09 04:27:29 -08:00
Kubernetes Prow Robot
d51f243c26
Merge pull request #98841 from caesarxuchao/fix-98479
Make proxy Transport return metav1.Status error
2021-03-09 04:27:20 -08:00
Kubernetes Prow Robot
a27a6e78f2
Merge pull request #98809 from answer1991/feature/enable-goaway-ut
enable goaway testcases
2021-03-09 04:27:11 -08:00
Kubernetes Prow Robot
11e9c32e4b
Merge pull request #97093 from aldudko/migrate-kubelet-logs
Migrate prober.probe logs to structured logging
2021-03-09 04:26:59 -08:00
Francesco Romani
1e7bb20c52 kubelet: podresources: per-endpoint metrics
Before the addition of GetAllocatableResources, the
podresources API had just one endpoint `List()`, thus we could just
account for the total of the calls to have a good pulse of the API usage.
Now that we extend the API with more endpoints
(`GetAlloctableResources`), in order to improve the observability we add
per-endpoint counters, in addition to the existing counter of the total
API calls.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:14:58 +01:00
Francesco Romani
d7a30e1b08 podresources: getallocatable: add feature gate
Add feature gate to disable the GetAllocatableResources API.
The feature gate isd alpha stage, disabled by default.

Add e2e test to demonstrate the behaviour with feature gate disabled.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:14:56 +01:00
Francesco Romani
6c8d4ee9ee podresources: devices: add test for dev reporting
Add test to reflect the correct behaviour according to
review comments.

Most notably, we should consider that -as the device plugin API
allows to express- a device ID can have multiple "NUMA" node IDs.
(example: AMD Rome).
More details:
https://github.com/kubernetes/kubernetes/pull/95734#discussion_r539545041

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:37 +01:00
Francesco Romani
e930799d28 podresources: test: add test for nil Topology
From https://github.com/kubernetes/kubernetes/pull/96553
we are reminded we need to handle the case on which
a device plugin reports nil Topology, which is legal.
Add unit test to ensure this case is handled.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:37 +01:00
Francesco Romani
da55ef0b9a node: podresources: list devices without topology
It's legal for device plugins to not expose topology informations.
Previously, the code was just skipping these devices.
Review highlighted is better to report them anyway and let the
client application decide if they still want somehow to track them
or skip them entirely.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:37 +01:00
Francesco Romani
16d5ac3689 node: e2e: docs and fix for teardownSRIOVConfig
Document why teardownSRIOVPod has to wait for all the containers
to be gone before to end, and why is important.

Additionally, change the code to wait for all the containers to be gone,
not just the first. This is both a little cleaner and a little safer,
even though it seems the current code caused no issues so far.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
adfff27279 node: e2e: run deleteSync in parallel
speedup the cleanup after testcases deleting pods in separate
goroutines.
The post-test cleanup stage must be done carefully since pod require
exclusive allocation - so pods must take all the steps to properly
cleanup the tests to avoid to pollute the environment, but
this has a negative effect on test duration (take longer).

Hence, we add safe speedups like doing pod deletions in parallel.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
9c69db3f04 e2e: node: add tests for GetAllocatableResources
Add e2e tests for the new GetAllocatableResources API.
The tests are added in the `podresources_test` suite
created previously in this series.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
8afdf4f146 node: podresources: translate types in cm
during the review, we convened that the manager types
(CPUSet, ResourceDeviceInstances) should not cross the
containermanager API boundary; thus, the ContainerManager layer
is the correct place to do the type conversion

We push back the type conversions from the podresources server
layer, fixing tests accordingly.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
ad68f9588c node: podresources: make GetDevices() consistent
We want to make the return type of the GetDevices() method of the
podresources DevicesProvider interface consistent with
the newly added GetAllocatableDevices type.
This makes the code easier to read and reduces the coupling between
the podresourcesapi server and the devicemanager code.

No intended changes in behaviour, but the different return types
now requires some data massaging. Tests are updated accordingly.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
6d33354e4c node: podresources: implement GetAllocatableResources API
Extend the podresources API implementing the GetAllocatableResources endpoint,
as specified in the KEPs:

https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2043-pod-resource-concrete-assigments
https://github.com/kubernetes/enhancements/pull/2404

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
8b79ad6533 node: podresources: add generated files
Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
c44f8214db node: podresources: add GetAllocatableResources API
Extend the podresources API adding the GetAllocatableResources endpoint,
as specified in the KEP
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2043-pod-resource-concrete-assigments

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
1375c5bdc7 node: podresources: make GetCPUs return cpuset
a upcoming patch wants to add GetAllocatableCPUs() returning a cpuset.
To make the code consistent and a bit more flexible, we change the
existing interface to also return a cpuset.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
4e7434028c e2e: node: bootstrap podresources tests
Start e2e tests for the existing List() API.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:35 +01:00
Federico Paolinelli
fa963f55ae Un-skip the hostnetwork udp endpoint test.
Since the test is being fixed, we can run the test.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
2021-03-09 11:52:35 +01:00
Federico Paolinelli
a0ca1fd63f Network Tests: bind host network udp listeners to hostIPs
When listening on udp, the reply is sent using a src address which is
the address of the gateway interface. This means that when listening to
any, the reply can be sent out with a src ip which is different from the
request's target ip. This confuses natting and "connectionful" udp
services do not work.
Here, we force the endpoint to listen from the hostIP and from podIPs,
to cover both dual stack and legacy clusters.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
2021-03-09 11:52:35 +01:00
Anago GCB
9780d88cb6 CHANGELOG: Update directory for v1.21.0-beta.1 release 2021-03-09 10:24:35 +00:00
Kubernetes Prow Robot
bce3863970
Merge pull request #98635 from rkilingr/enhancement/slice-capacity-kubectl
Cleanup: Provides capacity for make slice
2021-03-09 01:54:59 -08:00
wojtekt
bd3d1e7af0 Refactor upgrade tests to share more code 2021-03-09 10:06:12 +01:00
Sung Jun Park
5f69cf74d8 fix: when newly binding pvc to a pv, adjust pvc.status.capacity to pv's annotation that denotes the pre-resize capacity of the original pvc that pv was bound to if it has one
test: confirm that pvc's status capacity is adjusted if pv has a pre-resize capacity annotation
2021-03-09 07:55:10 +00:00
wojtekt
04a196a3dc Unify masterUpgrade and nodeUpgrade signatures 2021-03-09 08:50:49 +01:00
wojtekt
d1f721b73f Cleanup upgrade functions 2021-03-09 08:36:10 +01:00
Patrick Ohly
c4311ae754 generic ephemeral volumes: refresh rbac testdata
This is the result of
  UPDATE_BOOTSTRAP_POLICY_FIXTURE_DATA=true go test k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy

Apparently enabling the GenericEphemeralVolume feature by default
affect this test. The policy that it now tests against is indeed
the one needed for the controller.
2021-03-09 08:24:52 +01:00
Patrick Ohly
25f4174148 testdata: drop the alpha EphemeralVolumeSource.ReadOnly field
This is the result of
   UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test k8s.io/api
after removing the ReadOnly field from the API. The test data
for older releases must be updated because the current code
no longer supports that field.

The removal itself is okay because the struct was declared
as alpha.

Because EphemeralVolumeSource is embedded quite a lot, different types
are affected. Here is one example:

       --- FAIL: TestCompatibility/extensions.v1beta1.DaemonSet/v1.20.0 (0.04s)
            compatibility.go:476: json differs
            compatibility.go:477:   string{
                  	... // 12941 identical bytes
                  	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, //  |               }|
                  	0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, //  |.              }|
                - 	0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // -|,.              |
                - 	0x22, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, // -|"readOnly": true|
                  	0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, //  |.            }. |
                  	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, //  |         }.     |
                  	... // 31426 identical bytes
                  }

            compatibility.go:482: yaml differs
            compatibility.go:483:   string{
                  	... // 22893 identical bytes
                  	0x34, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x70, 0x68, 0x65, 0x6d, //  |4".        ephem|
                  	0x65, 0x72, 0x61, 0x6c, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, //  |eral:.          |
                - 	0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a, 0x20, // -|readOnly: true. |
                - 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,                                           // -|         |
                  	0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, //  |volumeClaimTempl|
                  	0x61, 0x74, 0x65, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, //  |ate:.           |
                  	... // 5965 identical bytes
                  }

            compatibility.go:488: proto differs
            compatibility.go:490:   (
                  	"""
                  	... // 459 identical lines
                  	                }
                  	              }
                - 	              2: 1
                  	            }
                  	          }
                  	... // 1083 identical lines
                  	"""
                  )

            compatibility.go:506: wrote expected compatibility data... verify, commit, and rerun tests
2021-03-09 08:24:52 +01:00
Patrick Ohly
52b758c9b6 generic ephemeral volume: generate code
This is the result of "make update" minus the testdata update which
will be committed separately.
2021-03-09 08:22:48 +01:00
Patrick Ohly
555d4a12bf generic ephemeral volumes: drop ReadOnly field
As discussed during the alpha review, the ReadOnly field is not really
needed because volume mounts can also be read-only. It's a historical
oddity that can be avoided for generic ephemeral volumes as part
of the promotion to beta.
2021-03-09 08:22:48 +01:00
Patrick Ohly
dcce753eda generic ephemeral volumes: promote to beta 2021-03-09 08:22:48 +01:00
tanjing2020
2d79ebbe58 Log invalid scheduler-policy input instead of panic 2021-03-09 15:21:46 +08:00
wojtekt
6d4a601b72 Compute upgradeContext once in upgrade tests 2021-03-09 08:14:30 +01:00