Commit Graph

122860 Commits

Author SHA1 Message Date
Peter Hunt
8dddf6d314 e2e_node: add test for max age after kubelet start
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-02-19 14:44:20 -05:00
Peter Hunt
a8ea936364 image gc: don't start until max age has passed since kubelet started
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-02-19 14:44:20 -05:00
Peter Hunt
6cd78bc5fc node e2e: add image max gc test
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-02-19 14:44:20 -05:00
Peter Hunt
be7856e340 e2e_node: factor out waitForKubeletToStart
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-02-19 14:31:38 -05:00
Adrian Reber
da8ffcd1dc
Switch 'ContainerCheckpoint' from Alpha to Beta
* Forensic Container Checkpointing as described in KEP 2008 moves from
   Alpha to Beta. This is corresponding code change.

 * Adapt e2e test to handle
   '(rpc error: code = Unimplemented desc = unknown method CheckpointContainer'
   and
   '(rpc error: code = Unimplemented desc = method CheckpointContainer not implemented)'
   and
   '(rpc error: code = Unknown desc = checkpoint/restore support not available)'
   One error message is if the CRI implementation does
   not implement the CRI RPC (too old) and the second is
   if the CRI implementation does explicitly not support the feature.
   The third error message can be seen if the container engine
   explicitly disabled the checkpoint/restore support,

 * As described in the corresponding KEP 2008 explicitly test for
   disabled functionality.

 * Extended test to look for the checkpoint kubelet metric.

 * Extended test to look for the CRI error metric.

 *  Add separate sub-resource permission to control permissions on
    the checkpoint kubelet API endpoint

Signed-off-by: Adrian Reber <areber@redhat.com>
2024-02-19 18:09:38 +00:00
Rodrigo Campos
5a8579a3e4 kubelet/userns: Remove tests that fail as root
For some reason the CI didn't fail when we open the PR. But when you run
"go test" as root, with all the capabilities, tests that exercise
permission errors will never work. As the capabilities makes them always
bypass the permission checks.

For some reason it seems that:
 * Not all our CI was run when the PR was open
 * The CI was changed to run as root now
 * _Some_ CI was added and it runs as root

If it wasn't one of that, or a combination, I don't see how this could
have happened. If any of that indeed happened, it can break more tests
outside the userns package too.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-02-19 14:52:33 -03:00
Patrick Ohly
cb3180950e dra e2e: fix stack unwinding in helper function
When failing inside the `ginkgo.By` callback function, skipping intermediate
stack frames didn't work properly because `ginkgo.By` itself and other internal
code is also on the stack.

To fix this, the code which can fail now runs outside of such a
callback. That's not a big loss, the only advantage of the callback was getting
timing statistics from Ginkgo which weren't used in practice.
2024-02-19 17:11:04 +01:00
Maciej Szulik
c6b483ea05
kube_codegen: expose plural-exceptions flag for client generation 2024-02-19 16:50:58 +01:00
Kubernetes Prow Robot
3516bc6f49
Merge pull request #122456 from AxeZhan/beta3960
[KEP 3960]: graduate PodLifecycleSleepAction to beta
2024-02-19 07:44:50 -08:00
Kubernetes Prow Robot
64386c5aba
Merge pull request #122419 from pohly/scheduler-perf-create-any
scheduler-perf: create any object from YAML
2024-02-19 07:44:40 -08:00
Jaime Caamaño Ruiz
aa0e47e863 Describe NetworkPolicy port ranges
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@redhat.com>
2024-02-19 13:28:09 +00:00
Michal Wozniak
fe8e896df8 Improve the doc comment for the Job status.active field 2024-02-19 14:27:30 +01:00
Kubernetes Prow Robot
a3ed4f0a57
Merge pull request #123381 from dims/bump-nfs-provisioner-to-v4.0.8
bump nfs-provisioner-to-v4.0.8
2024-02-19 05:20:31 -08:00
kerthcet
3c9c141d98 exchange the order of comparators
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-02-19 20:46:36 +08:00
kerthcet
7b108d8ee1 Add testcase covering unknown plugin config
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-02-19 20:45:48 +08:00
Davanum Srinivas
611f8ba815
bump nfs-provisioner-to-v4.0.8
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-02-19 07:18:21 -05:00
AxeZhan
c74ec3df09 graduate PodLifecycleSleepAction to beta 2024-02-19 19:40:52 +08:00
Kubernetes Prow Robot
7225dc6c3a
Merge pull request #123271 from neolit123/1.30-retry-all-api-calls
kubeadm: apply retries to all API calls in idempotency.go
2024-02-19 01:49:42 -08:00
Kubernetes Prow Robot
167376cd39
Merge pull request #123359 from kerthcet/cleanup/add-miseed-events
Add missed clusterEvents to UnrollWildCardResource
2024-02-19 00:48:46 -08:00
Kubernetes Prow Robot
7090b9d098
Merge pull request #123051 from yangjunmyfm192085/fixe2e
fix e2e test `test should assign default SC to PVCs that have no SC set` failure
2024-02-19 00:48:39 -08:00
Sascha Grunert
e158a83d9d
KEP-127: Add UserNamespacesPodSecurityStandards e2e test
Adding a e2e test for the functionality added in
https://github.com/kubernetes/kubernetes/pull/118760.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-02-19 08:51:50 +01:00
kerthcet
65faa9c680 Consider initContainer images in pod scheduling
Co-authored-by:     xiaomudk <xiaomudk@gmail.com>
Co-authored-by:     kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-02-19 14:17:57 +08:00
Kubernetes Prow Robot
70af917493
Merge pull request #123364 from dims/use-new-1.4-nfs-image
Use new 1.4 NFS image
2024-02-18 20:09:44 -08:00
kerthcet
b3ba6bda2b Add missed clusterEvents to UnrollWildCardResource
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-02-19 11:55:50 +08:00
Davanum Srinivas
fa6429a31c
Use new 1.4 NFS image
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-02-18 20:53:20 -05:00
Kubernetes Prow Robot
c0d3ae03fc
Merge pull request #123362 from dims/fix-nfs-related-ci-failures
Fix NFS related CI failures
2024-02-18 17:24:57 -08:00
Davanum Srinivas
ec394ec53d
Fix NFS related CI failures
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-02-18 17:24:59 -05:00
Lubomir I. Ivanov
c29450eb00 kubeadm: apply retries to all API calls in idempotency.go
The idempotency.go (perhaps not so accurately named) contains
API calls that kubeadm does against an API server using client-go.

Some users seem to have unstable setups where for unknown reasons
the API server can be unavailable or refuse to respond as expected.

Use PollUntilContextTimeout in all exported functions to ensure
such API calls are all retry-able.

NOTE: The context passed to PollUntilContextTimeout is not propagated
in the polled function. Instead the poll function creates it's own
context 'ctx := context.Background()', this is to avoid
breaking expectations on the side of the callers, that expect
a certain type of error and not "context timeout" errors.

Additional changes:
- Make all context.TODO() -> context.Background()
- Update all unit tests and make sure during testing the retry
interval and timeout are short. Test coverage of idempotency.go
is at ~97%.
- Remove the TestMutateConfigMapWithConflict test. It does not
contribute much, because conflict handling is done at the API,
server side, not on the side of kubeadm. This simulating this is not
needed.
2024-02-18 13:14:32 +02:00
Paco Xu
0f49a1e36e fix panic in CRI stats of windows 2024-02-18 15:03:11 +08:00
Kubernetes Prow Robot
8a0147c882
Merge pull request #123330 from alexzielenski/flake-workaround
flake: avoid flake by ensuring params appear in the initial list
2024-02-17 19:55:42 -08:00
Kubernetes Prow Robot
6ff6b51904
Merge pull request #123333 from liggitt/authz-metrics
Add allowed/denied metrics for authorizers
2024-02-17 18:28:55 -08:00
Kubernetes Prow Robot
da0bc0b489
Merge pull request #123357 from dims/bump-containerLogMonitorInterval-to-the-minimum-allowed
Bump containerLogMonitorInterval to the minimum allowed
2024-02-17 15:56:27 -08:00
Davanum Srinivas
dfc598b6fe
Bump containerLogMonitorInterval to the minimum allowed
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-02-17 17:53:19 -05:00
Kubernetes Prow Robot
ad432bc523
Merge pull request #123356 from kinvolk/rata/userns-cri
cri: add user_namespace field to RuntimeHandlerFeatures
2024-02-17 14:45:21 -08:00
Giuseppe Scrivano
01ce36dd9e KEP-127: add RuntimeHandler message to cri-api
so the CRI runtime can report what features are supported by each
handler.

It is currently used to report support for the user namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-17 17:36:48 -03:00
Kubernetes Prow Robot
1dce896e2c
Merge pull request #123261 from skitt/allow-codegen-verification
codegen: don't nuke files if only verifying
2024-02-16 19:03:36 -08:00
Kubernetes Prow Robot
99a15e0480
Merge pull request #122877 from kinvolk/rata/userns
kubelet/userns: Wrap error message
2024-02-16 19:03:30 -08:00
Maksym Pavlenko
ae0a813be1 Fix tests after rebase
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-16 16:02:10 -08:00
Peter Hunt
c8b4d8ebed kubelet: add reason field to image gc metric
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-02-16 16:02:41 -05:00
Abhijit Hoskeri
d3a0e296de Update x/crypto to 0.19.
Main reason is to pick up updated CA roots.

Full diff: https://github.com/golang/crypto/compare/v0.16.0...v0.19.0
2024-02-16 20:27:57 +00:00
Kubernetes Prow Robot
e43003195d
Merge pull request #123272 from AkihiroSuda/rro-cri
cri-api: KEP-3857: Recursive Read-only (RRO) mounts [Split from #123180 for ease of review]
2024-02-16 11:09:46 -08:00
Han Kang
f38852768e bump the stability level of apiserver_storage_size_bytes to STABLE 2024-02-16 10:03:39 -08:00
Maksym Pavlenko
5fcbc9d2fc Fix permission denied error
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-16 09:57:18 -08:00
Maksym Pavlenko
ff4f2907c5 Use non-default directory for pod logs and limit path to ASCII characters
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-16 09:57:17 -08:00
Maksym Pavlenko
19d9405a1c Update comments and error messages
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-16 09:56:01 -08:00
Maksym Pavlenko
d9e2487d0c Add PodLogsPath to kubelet config
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-16 09:55:59 -08:00
Matt Merkes
3e431adb03 Add AdditionalLabels to cloudprovider.InstanceMetadata
Signed-off-by: Matt Merkes <merkes@amazon.com>

Emits event when overriding labels in node controller

Signed-off-by: Matt Merkes <merkes@amazon.com>

Discard kubernetes.io additional labels in node controller

Signed-off-by: Matt Merkes <merkes@amazon.com>

Exclude kubernetes reserved label namespaces
2024-02-16 17:00:17 +00:00
Lubomir I. Ivanov
7db7222592 kubeadm: introduce the WaitForAllControlPlaneComponents feature gate
WaitForAllControlPlaneComponents is a new feature gate
that can be used to tell kubeadm to wait for all control plane
components and not only kube-apiserver.

- Add the Waiter function WaitForControlPlaneComponents
that waits for all CP components in parallel. Uses the regular
healthz endpoint for checks of status 200.
- Add a new experimental phase to kubeadm join called "wait-control-plane".
A similar phase exists for kubeadm init.
2024-02-16 17:33:38 +02:00
Kubernetes Prow Robot
0e8ef9c353
Merge pull request #123334 from pohly/lint-skip-in-verify
golangci-lint: optionally skip it during "make verify", II
2024-02-16 07:15:42 -08:00
Jordan Liggitt
d5d3eddb95
Add allowed/denied metrics for authorizers 2024-02-16 08:20:59 -05:00