Skip to content

Commit 4423ff5

Browse files
author
OpenShift Bot
authored
Merge pull request #14815 from dcbw/iptables-proxy-honor-BindAddress
Merged by openshift-bot
2 parents 651dd88 + c9b91fa commit 4423ff5

File tree

1 file changed

+4
-1
lines changed
  • pkg/cmd/server/kubernetes/node

1 file changed

+4
-1
lines changed

pkg/cmd/server/kubernetes/node/node.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ func (c *NodeConfig) RunProxy() {
362362
switch c.ProxyConfig.Mode {
363363
case componentconfig.ProxyModeIPTables:
364364
glog.V(0).Info("Using iptables Proxier.")
365+
if bindAddr.Equal(net.IPv4zero) {
366+
bindAddr = getNodeIP(c.Client, hostname)
367+
}
365368
if c.ProxyConfig.IPTablesMasqueradeBit == nil {
366369
// IPTablesMasqueradeBit must be specified or defaulted.
367370
glog.Fatalf("Unable to read IPTablesMasqueradeBit from config")
@@ -376,7 +379,7 @@ func (c *NodeConfig) RunProxy() {
376379
int(*c.ProxyConfig.IPTablesMasqueradeBit),
377380
c.ProxyConfig.ClusterCIDR,
378381
hostname,
379-
getNodeIP(c.Client, hostname),
382+
bindAddr,
380383
recorder,
381384
)
382385
if err != nil {

0 commit comments

Comments
 (0)