Commit Graph

115266 Commits

Author SHA1 Message Date
Sean Sullivan
2eccb77b2c OpenAPI V3 invalid document checks 2023-05-12 10:15:45 -07:00
Kubernetes Prow Robot
74a7d8a812 Merge pull request #117918 from seans3/automated-cherry-pick-of-#117768-#117796-origin-release-1.27
Automated cherry pick of #117768: QueryParamVerifierV3 resilient to minimal OpenAPI V3
#117796: QueryParamVerifier falls back on invalid v3 document
2023-05-11 11:53:19 -07:00
Kubernetes Prow Robot
4c39cdc418 Merge pull request #117815 from kerthcet/automated-cherry-pick-of-#117802-upstream-release-1.27
Automated cherry pick of #117802: Update podFailurePolicy comments from alpha-level to beta
2023-05-11 11:53:12 -07:00
Kubernetes Prow Robot
d1289c72c1 Merge pull request #117719 from swatisehgal/devicemgr-recovery-1.27
[1.27] node: device-mgr: Fix recovery flow by ensuring healthy devices exist and pre-allocated devices are healthy
2023-05-11 11:53:05 -07:00
Kubernetes Prow Robot
c6050655f9 Merge pull request #117825 from Huang-Wei/automated-cherry-pick-of-#117677-upstream-release-1.27
Automated cherry pick of #117677: Fix incorrect calculation for ResourceQuota with
2023-05-11 10:53:11 -07:00
Kubernetes Prow Robot
c806df20ea Merge pull request #117271 from jkh52/release-1.27
[release-1.27] Bump konnectivity-client to 0.1.2
2023-05-11 10:53:03 -07:00
Kubernetes Prow Robot
359bed0f97 Merge pull request #117905 from SataQiu/automated-cherry-pick-of-#117861-upstream-release-1.27
Automated cherry pick of #117861: kubeadm: fix a bug where file copy(backup) could not be
2023-05-11 09:15:02 -07:00
Sean Sullivan
642ea89617 update for feedback 2023-05-10 21:14:19 +00:00
Sean Sullivan
0457fbc83b QueryParamVerifier falls back on invalid v3 document 2023-05-10 21:14:18 +00:00
Sean Sullivan
4cd33af141 QueryParamVerifierV3 resilient to minimal OpenAPI V3 documents 2023-05-10 21:14:18 +00:00
SataQiu
ce458add6f kubeadm: fix a bug where file copy(backup) could not be executed correctly on Windows platform during upgrade 2023-05-10 21:28:23 +08:00
Kubernetes Prow Robot
80b77bf42d Merge pull request #117860 from kkkkun/automated-cherry-pick-of-#117354-upstream-release-1.27
automated-cherry-pick-of-#117354-upstream-release-1.27
2023-05-10 01:03:00 -07:00
Kubernetes Prow Robot
ded6a7fb1b Merge pull request #117365 from harshanarayana/automated-cherry-pick-of-#117364-upstream-release-1.27
changelog: fix formatting issue with v1.27 change log
2023-05-09 12:35:54 -07:00
kkkkun
3a56c1e954 Fix CHANGELOG-1.27 correct
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2023-05-08 17:30:58 +08:00
Wei Huang
fa86f2dce3 benchmark test to evaluate the overhead of podMatchesScopeFunc 2023-05-05 14:46:23 -07:00
Wei Huang
4a2e6971f7 Fix incorrect calculation for ResourceQuota with PriorityClass as its scope 2023-05-05 14:46:23 -07:00
Kubernetes Prow Robot
ddd031617f Merge pull request #117752 from liggitt/automated-cherry-pick-of-#117751-upstream-release-1.27
Automated cherry pick of #117751: Disable NewVolumeManagerReconstruction / SELinuxMountReadWriteOncePod feature gates
2023-05-05 13:51:17 -07:00
kerthcet
c041924dd1 Update podFailurePolicy comments from alpha-level to beta
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-05-06 00:25:25 +08:00
Kubernetes Prow Robot
108f028fe7 Merge pull request #117438 from pacoxu/automated-cherry-pick-of-#116675-upstream-release-1.27
Automated cherry pick of #116675 upstream release 1.27
2023-05-05 03:59:13 -07:00
Kubernetes Prow Robot
7352d95edc Merge pull request #117236 from cvvz/automated-cherry-pick-of-#116138-origin-release-1.27
Automated cherry pick of #116138: fix: the volume is not detached after the pod and PVC objects
2023-05-04 14:09:13 -07:00
Jordan Liggitt
7f9b3cb854 Disable NewVolumeManagerReconstruction feature gate 2023-05-04 16:42:50 -04:00
Kubernetes Prow Robot
1c7dc1a184 Merge pull request #117773 from xmudrii/go1204-127
[release-1.27] releng/go: Update images, dependencies and version to Go 1.20.4
2023-05-04 07:24:42 -07:00
Kubernetes Prow Robot
70b1a847a7 Merge pull request #117450 from alexanderConstantinescu/automated-cherry-pick-of-#117388-upstream-release-1.27
Automated cherry pick of #117388: Re-work logic in shouldSyncUpdatedNode
2023-05-04 04:49:05 -07:00
Kubernetes Prow Robot
bcd1aac164 Merge pull request #117445 from HirazawaUi/automated-cherry-pick-of-#117214-upstream-release-1.27
Automated cherry pick of #117214: add log includes pod preemption details
2023-05-04 04:48:53 -07:00
Kubernetes Prow Robot
36e6254100 Merge pull request #117298 from pohly/automated-cherry-pick-of-#117238-origin-release-1.27
Automated cherry pick of #117238: api: encode NamespacedName with lower case in JSON
2023-05-04 04:48:42 -07:00
Kubernetes Prow Robot
b54eb0d063 Merge pull request #117755 from Nordix/automated-cherry-pick-of-#117723-upstream-release-1.27
Automated cherry pick of #117723: Kube-proxy/ipvs: accept access to healthCheckNodePort on LbIP
2023-05-04 03:14:50 -07:00
Kubernetes Prow Robot
3f2a1f84ff Merge pull request #117246 from gnufied/automated-cherry-pick-of-#117216-upstream-release-1.27
Automated cherry pick of #117216: Fix azure disk e2e after migration
2023-05-04 03:14:42 -07:00
Marko Mudrinić
3324649c1c releng/go: Update images, dependencies and version to Go 1.20.4
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-05-04 10:47:48 +02:00
Kubernetes Prow Robot
23a15d098f Merge pull request #117574 from mpatlasov/automated-cherry-pick-of-#117022-upstream-release-1.27
Automated cherry pick of #117022: Fix directory mismatch for `volume.SetVolumeOwnership()`
2023-05-03 14:04:42 -07:00
Joseph Anttila Hall
ae2f576d0b Bump konnectivity-client to v0.1.2 2023-05-03 13:08:22 -07:00
Kubernetes Prow Robot
198503443b Merge pull request #117289 from tosi3k/automated-cherry-pick-of-#116950-upstream-release-1.27
Automated cherry pick of #116950: Do not look at VPC-related resources outside the cluster's
2023-05-03 13:04:41 -07:00
Lars Ekman
8af1ce5863 Kube-proxy/ipvs: accept access to healthCheckNodePort on LbIP 2023-05-03 18:38:42 +02:00
Kubernetes Prow Robot
33287eee36 Merge pull request #117369 from smarterclayton/automated-cherry-pick-of-#116995-upstream-release-1.27
Automated cherry pick of #116995: kubelet: Ensure pods that have not started track a
2023-05-03 06:48:13 -07:00
Kubernetes Prow Robot
7d93cc600f Merge pull request #117708 from Jefftree/automated-cherry-pick-of-#117705-upstream-release-1.27
Automated cherry pick of #117705: Update kube-openapi to fix race
2023-05-02 07:16:15 -07:00
Swati Sehgal
940b6892a1 node: device-plugin: e2e: Additional test cases
Additional test cases added:
Keeps device plugin assignments across pod and kubelet restarts (no device plugin re-registration)
Keeps device plugin assignments after the device plugin has re-registered (no kubelet or pod restart)

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-05-02 11:23:32 +01:00
Swati Sehgal
4cf566e32e node: device-plugin: add node reboot test scenario
Add a test suit to simulate node reboot (achieved by removing pods
using CRI API before kubelet is restarted).

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-05-02 11:23:31 +01:00
Swati Sehgal
d67481c478 node: device-plugin: e2e: Capture pod admission failure
This test captures that scenario where after kubelet restart,
application pod comes up and the device plugin pod hasn't re-registered
itself, the pod fails with admission error. It is worth noting that
once the device plugin pod has registered itself, another
application pod requesting devices ends up running
successfully.

For the test case where kubelet is restarted and device plugin
has re-registered without involving pod restart, since the
pod after kubelet restart ends up with admission error,
we cannot be certain the device that the second pod (pod2) would
get. As long as, it gets a device we consider the test to pass.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-05-02 11:23:31 +01:00
Swati Sehgal
6f5e29e26c node: device-mgr: e2e: adapt to sample device plugin refactoring
These updates are to adapt to the sample device plugin
refactoring done here: 92e00203e0.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-05-02 11:23:31 +01:00
Swati Sehgal
367e3d7c47 node: device-mgr: e2e: Update the e2e test to reproduce issue:109595
Breakdown of the steps implemented as part of this e2e test is as follows:
1. Create a file `registration` at path `/var/lib/kubelet/device-plugins/sample/`
2. Create sample device plugin with an environment variable with
   `REGISTER_CONTROL_FILE=/var/lib/kubelet/device-plugins/sample/registration` that
    waits for a client to delete the control file.
3. Trigger plugin registeration by deleting the abovementioned directory.
4. Create a test pod requesting devices exposed by the device plugin.
5. Stop kubelet.
6. Remove pods using CRI to ensure new pods are created after kubelet restart.
7. Restart kubelet.
8. Wait for the sample device plugin pod to be running. In this case,
   the registration is not triggered.
9. Ensure that resource capacity/allocatable exported by the device plugin is zero.
10. The test pod should fail with `UnexpectedAdmissionError`
11. Delete the test pod.
12. Delete the sample device plugin pod.
13. Remove `/var/lib/kubelet/device-plugins/sample/` and its content, the directory
    created to control registration

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-05-02 11:23:31 +01:00
Swati Sehgal
d241f58d8c node: device-mgr: e2e: Implement End to end test
This commit reuses e2e tests implmented as part of https://github.com/kubernetes/kubernetes/pull/110729.
The commit is borrowed from the aforementioned PR as is to preserve
authorship. Subsequent commit will update the end to end test to
simulate the problem this PR is trying to solve by reproducing
the issue: 109595.

Co-authored-by: Francesco Romani <fromani@redhat.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-05-02 11:23:31 +01:00
Swati Sehgal
aac4c15e62 node: device-mgr: Handle recovery by checking if healthy devices exist
In case of node reboot/kubelet restart, the flow of events involves
obtaining the state from the checkpoint file followed by setting
the `healthDevices`/`unhealthyDevices` to its zero value. This is
done to allow the device plugin to re-register itself so that
capacity can be updated appropriately.

During the allocation phase, we need to check if the resources requested
by the pod have been registered AND healthy devices are present on
the node to be allocated.

Also we need to move this check above `needed==0` where needed is
required - devices allocated to the container (which is obtained from
the checkpoint file) because even in cases where no additional devices
have to be allocated (as they were pre-allocated), we still need to
make sure he devices that were previously allocated are healthy.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-05-02 11:23:31 +01:00
Swati Sehgal
b157e1741f node: device-plugin: e2e: Add test case for kubelet restart
Capture explicitly a test case pertaining to kubelet restart
but with no pod restart and device plugin re-registration.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-05-02 11:23:12 +01:00
Swati Sehgal
5278e9c02c node: device-plugin: e2e: Provide sleep intervals via constants
Based on whether the test case requires pod restart or not, the sleep
interval needs to be updated and we define constants to represent the two
sleep intervals that can be used in the corresponding test cases.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
2023-05-02 11:23:12 +01:00
Swati Sehgal
b3c58acde9 node: device-plugin: e2e: Update test description to make it explicit
Explicitly state that the test involves kubelet restart and device plugin
re-registration (no pod restart)

We remove the part of the code where we wait for the pod to restart as this
test case should no longer involve pod restart.

In addition to that, we use `waitForNodeReady` instead of `WaitForAllNodesSchedulable`
for ensuring that the node is ready for pods to be scheduled on it.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
2023-05-02 11:23:12 +01:00
Swati Sehgal
0cd0fe70aa node: device-plugin: e2e: Isolate test to pod restart scenario
Rather than testing out for both pod restart and kubelet restart,
we change the tests to just handle pod restart scenario.

Clarify the test purpose and add extra check to tighten the test.

We would be adding additional tests to cover kubelet restart scenarios
in subsequent commits.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-05-02 11:23:11 +01:00
Swati Sehgal
ed8d4e1d6a node: device-plugin: e2e: Annotate device check with error message
With this change the error message are more helpful and easier
to troubleshoot in case of test failures.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-05-02 11:23:11 +01:00
Swati Sehgal
4899dc75dd node: device-plugins: e2e: s/devLen/expectedSampleDevsAmount
We rename to make the intent more explicit;
We make it global to be able to reuse the value all across the module
(e.g. to check the node readiness) later on.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
2023-05-02 11:23:11 +01:00
Swati Sehgal
c81ec1ae5b node: device-plugins: e2e: Refactor parse log to return string and error
Rather than only returning a string forcing us to log failure with
`framework.Fail`, we return a string and error to handle error cases
more conventionally. This enables us to use the `parseLog` function
inside `Eventually` and `Consistently` blocks, or in general to delegate
the error processing and enable better composability.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
2023-05-02 11:23:11 +01:00
Jefftree
86904a7c58 Update kube-openapi to fix race 2023-05-01 21:28:35 +00:00
Kubernetes Prow Robot
3c10a89212 Merge pull request #117433 from bobbypage/automated-cherry-pick-of-#117019-upstream-release-1.27
Automated cherry pick of #117019: kubelet: Mark new terminal pods as non-finished in pod worker
2023-05-01 12:46:11 -07:00