This repository was archived by the owner on Apr 20, 2026. It is now read-only.
Create 1.24 kubelet with Lyft patches#42
Merged
Conversation
This change turns off the ability to completely kill pods when the non-sidecars are done. This is useful for cronjobs, where the non-sidecars finish work and exit, this code previously would clean up the pod and its resources. This feature was pulled in from kubernetes#75099. This is a feature that sounds nice in practice, but its not what we need. It seems to be a bit buggy since the Pod sandbox can potentially be deleted and recreated during the liftime of the Pod. That ain't good.
Author
|
Dropping
1.23 uses CSI driver for PVs and EKS already uses CSI driver and therefore we don't have to carry-patch |
2dee25c to
f690357
Compare
Author
|
Successful tests - Failing tests - |
ardakuyumcu
approved these changes
Jul 28, 2023
CRI-O properly implements the CRI interface, and therefore it is capable of returning the container stats if being asked for. There is no reason to keep CRI-O as a special use case that has to be run with the legacy mode making kubelet using cadvisor on each container. This patch removes the hardcoded assumptions that CRI-O has cannot handle to return containers stats through CRI. Fixes kubernetes#73750 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
We're not guaranteed that the pod passed in has the ContainerSpec we're looking for. With this, we check if the pod has the container spec, and if it doesn't, we try to recover it one more time.
…ceeds 18446744073
Based on the api documentation https://pkg.go.dev/k8s.io/api/core/v1#ContainerState ``` ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting. ``` There is a case where no explicit state is known for a container and it must be treated as waiting state. So we must check for nil value (since the State is a value and pointer we have to check that all possible fields are nil , :( ) and treat it as Waiting state. Also fixes the `Restart running non-sidecars despite sidecar becoming not ready` test. A pod if needs to be restarted (i.e it had existed and has run at least one) the state of the container should be set to last running state. compare to zero value
…atus is not available (#37) 1. When all container statuses are nil, we should default to application containers wait untill statuses are available 2. When application container is nil, we should default to application containers waiting state
…nt (#40) based on https://lyft.slack.com/archives/C017X524VC7/p1685639606706689?thread_ts=1685481685.730389&cid=C017X524VC7 when there are no sidecars we should allow all containers to start even when there is lack of container status. This fixes a regression introduced in #37 where we would block starting containers until we get container status reported. this triggers KillPod action in 1.16 as no progress can be made. --------- Co-authored-by: Tom Wanielista <tomwans@users.noreply.github.com>
f690357 to
85f0521
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commits --