Add falg to report node internal IP address in ingress status

This commit is contained in:
Manuel de Brito Fontes 2017-10-08 14:29:19 -03:00
parent 4479b54953
commit 284448f8d9
5 changed files with 34 additions and 20 deletions

View file

@ -66,6 +66,8 @@ type Config struct {
UpdateStatusOnShutdown bool
UseNodeInternalIP bool
IngressLister store.IngressLister
DefaultIngressClass string
@ -267,7 +269,7 @@ func (s *statusSync) runningAddresses() ([]string, error) {
addrs := []string{}
for _, pod := range pods.Items {
name := k8s.GetNodeIP(s.Client, pod.Spec.NodeName)
name := k8s.GetNodeIP(s.Client, pod.Spec.NodeName, s.UseNodeInternalIP)
if !sliceutils.StringInSlice(name, addrs) {
addrs = append(addrs, name)
}