-
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
Optimize inplace update and support pod-template-hash label for cloneset #931
Optimize inplace update and support pod-template-hash label for cloneset #931
Conversation
/lgtm |
@@ -198,6 +206,22 @@ func (c *realControl) refreshPodState(cs *appsv1alpha1.CloneSet, coreControl clo | |||
return false, res.DelayDuration, nil | |||
} | |||
|
|||
func (c *realControl) fixPodTemplateHashLabel(cs *appsv1alpha1.CloneSet, pod *v1.Pod) (bool, error) { |
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.
please comment the history and reason of why we need "fix" template hash. It seems that previously we only has controllerrevisionhash in the pod
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
d72d698
to
20ba503
Compare
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.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FillZpp 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 |
Signed-off-by: FillZpp FillZpp.pub@gmail.com
Ⅰ. Describe what this PR does
Optimize inplace update and support
pod-template-hash
label for cloneset.Now there are two hash labels in pods that managed by cloneset:
controller-revision-hash
is still the important one that indicates the pod version. It defaults to be"{CLONESET_NAME}-{HASH}"
, and it will be"{HASH}"
if user enabled theCloneSetShortHash
feature-gate.pod-template-hash
should always be the short format"{HASH}"
. cloneset-controller will not rely on it, but some other controllers, such as kruise-rollout, may use it to be the service selector.