-
Couldn't load subscription status.
- Fork 1.8k
check initContainers for the kubernetes sidecar implementation
#8986
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
check initContainers for the kubernetes sidecar implementation
#8986
Conversation
|
The following is the coverage report on the affected files.
|
|
/retest |
5d140c4 to
1aed4fc
Compare
|
With these changes: |
|
The following is the coverage report on the affected files.
|
|
/retest |
|
@pritidesai: GitHub didn't allow me to request PR reviews from the following users: kgcarr, say5. Note that only tektoncd members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
This looks great. The feature is very useful, and it makes sense to take the initContainer statuses into account when we think of the overall completion status. This implementation is closely tied to the sidecar feature right now, it might be better to have this decoupled into another config setting and a annotation which would help users disable this feature if necessary.
I'm not sure I agree, this is a bug fix for the existing feature rather than adding a new feature. Without this check, the TaskRun status is incorrect / incomplete as it does not reflect an accurate status for the sidecars. |
This code checks if all containers in a Pod, including init containers, have completed their execution before marking a TaskRun as complete when kubernetes native sidecar is enabled. It's part of the TaskRun status determination logic. Signed-off-by: Priti Desai <pdesai@us.ibm.com>
1aed4fc to
dc151a7
Compare
|
The following is the coverage report on the affected files.
|
|
/retest |
|
@waveywaves, this is ready for review - let me know if you have any feedback, appreciate your time! |
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.
Thanks, this looks good to me
/approve
| // When EnableKubernetesSidecar is true, we need to ensure all init containers | ||
| // are completed before considering the taskRun complete, in addition to the regular containers. | ||
| // This is because sidecars in Kubernetes can keep running after the main containers complete. | ||
| if config.FromContextOrDefaults(ctx).FeatureFlags.EnableKubernetesSidecar { |
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.
NIT: I wonder if this could be checked in all cases (even if sidecar is not enabled).
That said, having the check helps reducing the scope of the patch and makes it a better candidate for backporting.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afrittoli The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@AlanGreene makes sense, was thinking about this in a more holistic way, where this initContainer completion is something we should add apart from just checking it for the sidecar. @afrittoli also hinted at this here. I will capture this in a separate issue for now. |
yes, lets create a separate issue. All tekton internal processing runs as Traditionally, we have determined the |
|
@vdemeester @waveywaves I will appreciate it if you could review the changes in this PR, looking for one more review, thanks! |
|
/lgtm this looks good, I am still working on a issue for this, shall create it soon |
|
/cherry-pick release-v1.3.x |
|
/cherrypick release-v1.3.x |
Changes
This code checks if all containers in a Pod, including init containers, have completed their execution before marking a TaskRun as complete when kubernetes native sidecar is enabled. It's part of the TaskRun status determination logic.
/kind bug
Closes #8987
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes