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

fix: skip revision injection when pod matched UpdateStrategy.Selector #1503

Closed
wants to merge 1 commit into from

Conversation

0xgj
Copy link
Contributor

@0xgj 0xgj commented Feb 9, 2024

Ⅰ. Describe what this PR does

This pull request aims to address the issue of revision injection for pods that match the upgrade policy. Currently, if a pod that has already been upgrade is recreated due to machine or pod failure, it will rollback to the old revision, leading to a false-positive release observation. This PR proposes a fix by implementing comments (

// AlwaysSidecarSetInjectRevisionPolicy means the SidecarSet will always inject
// the specific revision to Pods when pod creating, except matching UpdateStrategy.Selector.
AlwaysSidecarSetInjectRevisionPolicy SidecarSetInjectRevisionPolicy = "Always"
).

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

unit test and manually.

Ⅳ. Special notes for reviews

Signed-off-by: kim <4017010+0xgj@users.noreply.github.com>
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign furykerry for approval by writing /assign @furykerry in a comment. For more information see:The Kubernetes Code Review Process.

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

@kruise-bot kruise-bot added the size/L size/L: 100-499 label Feb 9, 2024
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 48.62%. Comparing base (5421ee7) to head (bc07628).
Report is 72 commits behind head on master.

Files Patch % Lines
pkg/webhook/pod/mutating/sidecarset.go 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1503      +/-   ##
==========================================
+ Coverage   48.55%   48.62%   +0.06%     
==========================================
  Files         157      157              
  Lines       22480    22490      +10     
==========================================
+ Hits        10916    10935      +19     
+ Misses      10360    10352       -8     
+ Partials     1204     1203       -1     
Flag Coverage Δ
unittests 48.62% <70.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zmberg
Copy link
Member

zmberg commented Feb 18, 2024

@0xgj UpdateStrategy.Selector field affects the injection logic is not appropriate, in addition, there have some scenarios can not be solved, this solution is not convenient to merge in for the time being.

If you have new ideas, welcome to the community meeting to discuss!

@kruise-bot
Copy link

@0xgj: 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.

Copy link

stale bot commented Jul 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 7, 2024
@stale stale bot closed this Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold needs-rebase size/L size/L: 100-499 wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants