-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add implementation details to sidecar kep #841
Merged
k8s-ci-robot
merged 1 commit into
kubernetes:master
from
Joseph-Irving:sidecar_kep_update
Mar 22, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inner loop iterates over kubecontainer.Container (as opposed to
v1.Container
), which doesn't seem to have a way to tell whether the container is a sidecar. You might be able to cross-reference from thev1.Pod
that also gets passed in, but we need to be careful to validate that that argument contains what we think it does. For example, I saw some comments that seemed to implypod
might benil
sometimes; we need to know what those cases are, and whether we can handle them properly.It might end up being necessary to add data to
kubecontainer.Container
. I'm not sure if that represents a change to CRI? I'm also new to this code.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah I missed that. Looking around it seems to indicate that
Pod may be nil, running pod must not be.
If the pod is dead we're not as bothered about term ordering, so cross referencing may work with aif pod != nil
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can verify that
pod
is only evernil
when thePod
object on the API server has been force-deleted, then I agree it's reasonable to say, "We don't respect sidecar termination order if you force-delete the Pod." Have you found any evidence to say exactly whenpod
could benil
? For example, is it possible as a transient condition during a Node restart, before it fetches Pods from the API server?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not confident from looking at the code that I could tell you all the scenarios where
pod
could benil
. If @feiskyer could weigh in it would be appreciated. If there are scenarios where it can be nil and we still care about ordering then we'll need to look at a different way to enable this behaviour. Changingkubecontainer.Container
is a possibility but it means changing the container runtime.