openyurt icon indicating copy to clipboard operation
openyurt copied to clipboard

add auto pod upgrade controller for daemoset

Open xavier-hou opened this issue 2 years ago • 9 comments

Signed-off-by: hxcGit [email protected]

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line: /kind bug /kind documentation /kind enhancement /kind good-first-issue /kind feature /kind question /kind design /sig ai /sig iot /sig network /sig storage

What this PR does / why we need it:

#921

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

xavier-hou avatar Aug 26 '22 02:08 xavier-hou

@hxcGit: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide

In response to this:

Signed-off-by: hxcGit [email protected]

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line: /kind bug /kind documentation /kind enhancement /kind good-first-issue /kind feature /kind question /kind design /sig ai /sig iot /sig network /sig storage

What this PR does / why we need it:

#921

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

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.

openyurt-bot avatar Aug 26 '22 02:08 openyurt-bot

Codecov Report

Merging #970 (b1d4411) into master (83d0d2d) will increase coverage by 3.55%. The diff coverage is 50.46%.

@@            Coverage Diff             @@
##           master     #970      +/-   ##
==========================================
+ Coverage   44.04%   47.59%   +3.55%     
==========================================
  Files          83       89       +6     
  Lines       11346    12548    +1202     
==========================================
+ Hits         4997     5972     +975     
- Misses       5913     6060     +147     
- Partials      436      516      +80     
Flag Coverage Δ
unittests 47.59% <50.46%> (+3.55%) :arrow_up:

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

Impacted Files Coverage Δ
.../daemonpodupdater/daemon_pod_updater_controller.go 38.02% <38.02%> (ø)
...er/daemonpodupdater/kubernetes/controller_utils.go 52.38% <52.38%> (ø)
pkg/controller/daemonpodupdater/util.go 70.50% <70.50%> (ø)
...controller/daemonpodupdater/kubernetes/pod_util.go 78.12% <78.12%> (ø)
pkg/yurtctl/util/kubernetes/util.go 20.00% <0.00%> (-12.17%) :arrow_down:
pkg/yurthub/cachemanager/cache_agent.go 49.27% <0.00%> (-5.28%) :arrow_down:
pkg/yurthub/filter/approver.go 75.65% <0.00%> (ø)
pkg/yurthub/network/iptables.go 0.00% <0.00%> (ø)
pkg/yurthub/certificate/hubself/fake_cert_mgr.go 0.00% <0.00%> (ø)
pkg/yurthub/certificate/hubself/cert_mgr.go 20.04% <0.00%> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Aug 26 '22 02:08 codecov[bot]

@hxcGit please fix the errors of github actions.

rambohe-ch avatar Aug 26 '22 08:08 rambohe-ch

@hxcGit we should consider the name of controller carefully. and i think podupgrade for newly added controller is not a good name.

rambohe-ch avatar Aug 26 '22 08:08 rambohe-ch

@hxcGit we should consider the name of controller carefully. and i think podupgrade for newly added controller is not a good name.

Yes, it's just a temporary name.

xavier-hou avatar Aug 26 '22 11:08 xavier-hou

@hxcGit when auto upgrade mode is used, we need to consider the number of unavailable pods should be under some limit, so only limited pods will be crash when end user make a mistake to upgrade(like use a out-of-use image).

rambohe-ch avatar Sep 01 '22 09:09 rambohe-ch

@hxcGit when auto upgrade mode is used, we need to consider the number of unavailable pods should be under some limit, so only limited pods will be crash when end user make a mistake to upgrade(like use a out-of-use image).

@rambohe-ch I think kubernetes rollingUpdate offers a nice implementation. How about reusing its source code? The modification required maybe is to judge whether nodes are ready when calculating the number of unavailable pods. For pods on not-ready nodes do not count in the total number of unavailable pods.

xavier-hou avatar Sep 05 '22 02:09 xavier-hou

@hxcGit when auto upgrade mode is used, we need to consider the number of unavailable pods should be under some limit, so only limited pods will be crash when end user make a mistake to upgrade(like use a out-of-use image).

@rambohe-ch I think kubernetes rollingUpdate offers a nice implementation. How about reusing its source code? The modification required maybe is to judge whether nodes are ready when calculating the number of unavailable pods. For pods on not-ready nodes do not count in the total number of unavailable pods.

@hxcGit I agree with you. please go ahead~

rambohe-ch avatar Sep 05 '22 03:09 rambohe-ch

/lgtm /approve

rambohe-ch avatar Sep 27 '22 06:09 rambohe-ch

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rambohe-ch, xavier-hou

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openyurt-bot avatar Sep 27 '22 06:09 openyurt-bot