Skip to content

Commit

Permalink
Fix Rebase issue
Browse files Browse the repository at this point in the history
Rancher annotation fix merge into wrong place after rebase.
Annotation ip should be returned after internal ip in GetNodeIPOrName.
  • Loading branch information
orangedeng committed Jun 23, 2018
1 parent a6a82dd commit d7bd680
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions internal/k8s/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ func GetNodeIPOrName(kubeClient clientset.Interface, name string, useInternalIP
}
}
}
if node.Annotations != nil {
if annotatedIP := node.Annotations[externalAddressAnnotation]; annotatedIP != "" {
return annotatedIP
}
if annotatedIP := node.Annotations[internalAddressAnnotation]; annotatedIP != "" {
return annotatedIP
}
}

if node.Annotations != nil {
if annotatedIP := node.Annotations[externalAddressAnnotation]; annotatedIP != "" {
return annotatedIP
}
if annotatedIP := node.Annotations[internalAddressAnnotation]; annotatedIP != "" {
return annotatedIP
}
}

Expand Down

0 comments on commit d7bd680

Please sign in to comment.