-
Notifications
You must be signed in to change notification settings - Fork 771
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 condition and event info for not upgradable pods when update sidecarset (#1272) #1309
add condition and event info for not upgradable pods when update sidecarset (#1272) #1309
Conversation
Welcome @MarkLux! It looks like this is your first PR to openkruise/kruise 🎉 |
@MarkLux How about considering a condition for such Pod instead of an event? (too many events will oppress ETCD) |
do you mean this?
But the Condition Field may be too short to show the reason, and it's not obvious. I think after user updated SidecarSet, they need a feedback. If too many events can make an extra stress to etcd, how about add event for SidecarSet instead of Pods? (thus we only got an single event for each update) btw, currently when the sidecar upgrade succeeded, an event will be added to all the pods(by kubectl), will this also generate too many events? |
d3c6995
to
27e6ba6
Compare
@MarkLux How about this condition? conditions:
- type: SidecarSetUpgradable
status: False
reason: UpdateImmutableField
message: Pod env and volume fields cannot be modified |
got it, I'll change the codes, thanks for your advice |
27e6ba6
to
7a6c1d7
Compare
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #1309 +/- ##
==========================================
+ Coverage 48.37% 48.62% +0.24%
==========================================
Files 151 152 +1
Lines 21178 21341 +163
==========================================
+ Hits 10245 10377 +132
- Misses 9808 9824 +16
- Partials 1125 1140 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 12 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
2aa0940
to
4f0f5b2
Compare
@veophi made a draft based on adding condition, could you have a brief view on it? some problems are commented |
a340aea
to
cec7aa8
Compare
cec7aa8
to
3ada88a
Compare
b3ff93e
to
a1e7299
Compare
/lgtm |
/remove lgtm |
@MarkLux If there are more than one SidecarSets that all select one Pod, you must refresh this condition of the Pod to You can refer to [the following codes] to fix your logic (
|
got it |
0a399a1
to
dd4faad
Compare
Signed-off-by: MarkLux <marlx6590@163.com>
d911f9a
to
ffa34ca
Compare
@zmberg PTAL |
37085ff
to
6a01d5a
Compare
…ise#1272) Signed-off-by: MarkLux <marlx6590@163.com>
6a01d5a
to
4db30ba
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zmberg 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 |
…carset (openkruise#1272) (openkruise#1309) * add condition for pods and event for sidecarset when detecting not upgradable pod (openkruise#1272) Signed-off-by: MarkLux <marlx6590@163.com> * add e2e test for sidecarset upgrade out of image fields(openkruise#1272) Signed-off-by: MarkLux <marlx6590@163.com> * only update condition to true when all sidecarset upgradable (openkruise#1272) Signed-off-by: MarkLux <marlx6590@163.com> --------- Signed-off-by: MarkLux <marlx6590@163.com>
…carset (openkruise#1272) (openkruise#1309) * add condition for pods and event for sidecarset when detecting not upgradable pod (openkruise#1272) Signed-off-by: MarkLux <marlx6590@163.com> * add e2e test for sidecarset upgrade out of image fields(openkruise#1272) Signed-off-by: MarkLux <marlx6590@163.com> * only update condition to true when all sidecarset upgradable (openkruise#1272) Signed-off-by: MarkLux <marlx6590@163.com> --------- Signed-off-by: MarkLux <marlx6590@163.com>
…carset (openkruise#1272) (openkruise#1309) * add condition for pods and event for sidecarset when detecting not upgradable pod (openkruise#1272) * add e2e test for sidecarset upgrade out of image fields(openkruise#1272) * only update condition to true when all sidecarset upgradable (openkruise#1272) ---------
Ⅰ. Describe what this PR does
Currently the sidecar container in-place upgrade can only support changing of
image
field, if user changed other fields, the injected pods will not execute sidecar container upgrade.However, this rule is not explicit for users, they can not get any hint or info in this situation. This PR add an event for pods, when the injected sidecar changed but cannot be upgrade. If user changed SidecarSet but the pods are not upgraded, they can use
kubectl describe sidecarset <sidecarset-name>
orkubectl describe pod <pod-name>
to see the event and figure out the reason.Ⅱ. Does this pull request fix one issue?
fixes #1272
Ⅲ. Describe how to verify it
image
(here I change theimage
and add acommand
field)kubectl get pod
, we can see the condition info:Ⅳ. Special notes for reviews