Skip to content
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

Run stopSidecar logic even if TaskSpec has no sidecars to support injected sidecars such as istio-proxy #5067

Conversation

SaschaSchwarze0
Copy link
Contributor

Run stopSidecar logic even if TaskSpec has no sidecars to support injected sidecars such as istio-proxy

Signed-off-by: Sascha Schwarze schwarzs@de.ibm.com

Changes

Sidecars in a Tekton pod can be declared in the TaskSpec, but could theoretically also be injected by a webhook, such as the istio-proxy.

The logic in stopSidecars was optimized to omit loading a Pod unnecessarily. But that did not honor the webhook-injected sidecars.

I am changing the logic to only skip the stopSidecars logic if the running-in-environment-with-injected-sidecars feature flag is set to false (default is true).

Still need to work out the unit test.

/kind bug

Fixes #4731

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in
    (if there are no user facing changes, use release note "NONE")

Release Notes

The logic to stop sidecars is now running also for TaskRuns without a sidecar in its spec, if the `running-in-environment-with-injected-sidecars` is set to `true`

…ected sidecars such as istio-proxy

Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
@tekton-robot tekton-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 4, 2022
@SaschaSchwarze0 SaschaSchwarze0 marked this pull request as draft July 4, 2022 08:56
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 4, 2022
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign pritidesai after the PR has been reviewed.
You can assign the PR to them by writing /assign @pritidesai in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 4, 2022
@tekton-robot
Copy link
Collaborator

Hi @SaschaSchwarze0. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@afrittoli
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 5, 2022
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 80.9% 81.0% 0.1

@tomkennedy513
Copy link
Contributor

@SaschaSchwarze0 do you have any plans to continue working on this PR? Looking forward to this change!

@SaschaSchwarze0
Copy link
Contributor Author

@SaschaSchwarze0 do you have any plans to continue working on this PR? Looking forward to this change!

Sure, but beside asking for it, maybe you can help here #4731 (comment) ?

@tomkennedy513
Copy link
Contributor

@SaschaSchwarze0 do you have any plans to continue working on this PR? Looking forward to this change!

Sure, but beside asking for it, maybe you can help here #4731 (comment) ?

I ended up taking a stab at the issue myself and made a new pr (#5565)

@tekton-robot
Copy link
Collaborator

@SaschaSchwarze0: PR needs rebase.

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.

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 2022
@jerop
Copy link
Member

jerop commented Feb 2, 2023

closing because there's a newer pull request addressing the same issue - #5565 - thank you @SaschaSchwarze0 (feel free to reopen if needed)

/close

@tekton-robot
Copy link
Collaborator

@jerop: Closed this PR.

In response to this:

closing because there's a newer pull request addressing the same issue - #5565 - thank you @SaschaSchwarze0 (feel free to reopen if needed)

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

istio-proxy container not stopped after running as taskrun
5 participants