Skip to content

Commit

Permalink
Merged in fix/pod-has-no-ip (pull request #9)
Browse files Browse the repository at this point in the history
fix pod has no ip

Approved-by: MengxinLiu <mengxin@alauda.io>
  • Loading branch information
halfcrazy committed Apr 10, 2019
2 parents cb41585 + 049cab2 commit 4d26cad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func (c *Controller) enqueueDeletePod(obj interface{}) {
func (c *Controller) enqueueUpdatePod(oldObj, newObj interface{}) {
oldPod := oldObj.(*v1.Pod)
newPod := newObj.(*v1.Pod)
// assigned to a node
if oldPod.Spec.NodeName == "" && newPod.Spec.NodeName != "" {
// pod assigned an ip
if oldPod.Status.PodIP == "" && newPod.Status.PodIP != "" {
var key string
var err error
if key, err = cache.MetaNamespaceKeyFunc(newObj); err != nil {
Expand Down

0 comments on commit 4d26cad

Please sign in to comment.