Add falg to report node internal IP address in ingress status
This commit is contained in:
parent
4479b54953
commit
284448f8d9
5 changed files with 34 additions and 20 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue