-
Notifications
You must be signed in to change notification settings - Fork 459
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
Merge handleAddPod with handleUpdatePod. #2563
Conversation
|
|
pkg/controller/pod.go
Outdated
@@ -1218,6 +1123,27 @@ func needAllocateSubnets(pod *v1.Pod, nets []*kubeovnNet) []*kubeovnNet { | |||
return result | |||
} | |||
|
|||
func needRouteSubnets(pod *v1.Pod, nets []*kubeovnNet) []*kubeovnNet { | |||
if pod.Status.Phase == v1.PodSucceeded || |
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.
Can we use isPodAlive
?
if !isOvnSubnet(n.Subnet) { | ||
continue | ||
} | ||
|
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.
should check if pod.Annotations is nil here
pkg/controller/pod.go
Outdated
return err | ||
} | ||
|
||
// check if allocate subnet is need. also allocte subnet when hotplug nic |
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.
allocte -> allocate
ValidatePodCidr and create lsp only in handleAddPod before; For hotplug and hotunplug nic for a running pod. we also need support when update pod. so merge handleAddPod with handleUpdatePod to handleAddPodOrUpdatePod.
|
This reverts commit 2fb1f95.
…"" This reverts commit 3348462.
ValidatePodCidr and create lsp only in handleAddPod before;
For hotplug and hotunplug nic for a running pod. we also need support when update pod.
so merge handleAddPod with handleUpdatePod to handleAddPodOrUpdatePod.
What type of this PR
Examples of user facing changes:
Which issue(s) this PR fixes:
Fixes #2520