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: inplace update failed due to virtual kubelet in PUB #1359

Closed

Conversation

chengjoey
Copy link
Contributor

Ⅰ. Describe what this PR does

fix inplace update failed due to inplace update on vk node
skip inPlaceUpdateState check when pod is running on vk node

Ⅱ. Does this pull request fix one issue?

fix #1262

Ⅲ. Describe how to verify it

inplace update on vk node

@sonatype-lift
Copy link

sonatype-lift bot commented Aug 4, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@kruise-bot
Copy link

Welcome @chengjoey! It looks like this is your first PR to openkruise/kruise 🎉

@kruise-bot kruise-bot added the size/M size/M: 30-99 label Aug 4, 2023
@chengjoey
Copy link
Contributor Author

/assign @zmberg @ftpilot

@kruise-bot
Copy link

@chengjoey: GitHub didn't allow me to assign the following users: ftpilot.

Note that only openkruise 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:

/assign @zmberg @ftpilot

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.

@@ -43,6 +44,21 @@ const (
MaxUnavailablePodSize = 2000
)

var (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about making var together?

var (
labelNodeTypeKey = "type"
virtualNodeType = "virtual-kubelet"

taintVirtualToFind = &corev1.Taint{
		Key:    "virtual-kubelet.io/provider",
		Effect: corev1.TaintEffectNoSchedule,
	}
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

klog.Errorf("get node(%s) failed: %s", nodeName, err.Error())
return false
}
return node.Labels[labelNodeTypeKey] == virtualNodeType && taints.TaintExists(node.Spec.Taints, taintVirtualToFind)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is no need to check the taints on node, virtualNode label is enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, removed the judgment of taint, virtualNode label in enough

Copy link
Member

@hantmac hantmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hantmac
Once this PR has been reviewed and has the lgtm label, please ask for approval from zmberg by writing /assign @zmberg 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

@veophi veophi changed the title fix: inplace update failed due to virtual kubelet fix: inplace update failed due to virtual kubelet in PUB Aug 11, 2023
@zmberg
Copy link
Member

zmberg commented Sep 6, 2023

This situation is still a bit more complicated, you can't skip the vk node so easily, many of our internal scenarios vk can be upgraded in place

@zmberg
Copy link
Member

zmberg commented Sep 6, 2023

/hold

@kruise-bot
Copy link

New changes are detected. LGTM label has been removed.

@kruise-bot kruise-bot added size/L size/L: 100-499 and removed size/M size/M: 30-99 labels Sep 6, 2023
@chengjoey
Copy link
Contributor Author

This situation is still a bit more complicated, you can't skip the vk node so easily, many of our internal scenarios vk can be upgraded in place

Thanks! @zmberg, I added a judgment, only the pod running on the virtual node and UpdateEnvFromMetadata is turned on will skip the check

skip inPlaceUpdateState check when pod is running on vk node and enable `UpdateEnvFromMetadata`

Signed-off-by: joey <zchengjoey@gmail.com>
Copy link

stale bot commented Dec 7, 2023

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 Dec 7, 2023
@stale stale bot closed this Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold 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.

[feature request] 在virtual-kubelet节点中,优化原地升级支持
4 participants