Skip to content

Commit 49eea5f

Browse files
author
OpenShift Bot
authored
Merge pull request #11677 from rajatchopra/bz1389718
Merged by openshift-bot
2 parents 1292bde + 1ac0c52 commit 49eea5f

File tree

11 files changed

+92
-16
lines changed

11 files changed

+92
-16
lines changed

contrib/completions/bash/oadm

+4
Original file line numberDiff line numberDiff line change
@@ -4308,6 +4308,8 @@ _oadm_router()
43084308
local_nonpersistent_flags+=("--external-host-https-vserver=")
43094309
flags+=("--external-host-insecure")
43104310
local_nonpersistent_flags+=("--external-host-insecure")
4311+
flags+=("--external-host-internal-ip=")
4312+
local_nonpersistent_flags+=("--external-host-internal-ip=")
43114313
flags+=("--external-host-partition-path=")
43124314
local_nonpersistent_flags+=("--external-host-partition-path=")
43134315
flags+=("--external-host-password=")
@@ -4316,6 +4318,8 @@ _oadm_router()
43164318
local_nonpersistent_flags+=("--external-host-private-key=")
43174319
flags+=("--external-host-username=")
43184320
local_nonpersistent_flags+=("--external-host-username=")
4321+
flags+=("--external-host-vxlan-gw=")
4322+
local_nonpersistent_flags+=("--external-host-vxlan-gw=")
43194323
flags+=("--force-subdomain=")
43204324
local_nonpersistent_flags+=("--force-subdomain=")
43214325
flags+=("--host-network")

contrib/completions/bash/oc

+4
Original file line numberDiff line numberDiff line change
@@ -4358,6 +4358,8 @@ _oc_adm_router()
43584358
local_nonpersistent_flags+=("--external-host-https-vserver=")
43594359
flags+=("--external-host-insecure")
43604360
local_nonpersistent_flags+=("--external-host-insecure")
4361+
flags+=("--external-host-internal-ip=")
4362+
local_nonpersistent_flags+=("--external-host-internal-ip=")
43614363
flags+=("--external-host-partition-path=")
43624364
local_nonpersistent_flags+=("--external-host-partition-path=")
43634365
flags+=("--external-host-password=")
@@ -4366,6 +4368,8 @@ _oc_adm_router()
43664368
local_nonpersistent_flags+=("--external-host-private-key=")
43674369
flags+=("--external-host-username=")
43684370
local_nonpersistent_flags+=("--external-host-username=")
4371+
flags+=("--external-host-vxlan-gw=")
4372+
local_nonpersistent_flags+=("--external-host-vxlan-gw=")
43694373
flags+=("--force-subdomain=")
43704374
local_nonpersistent_flags+=("--force-subdomain=")
43714375
flags+=("--host-network")

contrib/completions/bash/openshift

+8
Original file line numberDiff line numberDiff line change
@@ -4308,6 +4308,8 @@ _openshift_admin_router()
43084308
local_nonpersistent_flags+=("--external-host-https-vserver=")
43094309
flags+=("--external-host-insecure")
43104310
local_nonpersistent_flags+=("--external-host-insecure")
4311+
flags+=("--external-host-internal-ip=")
4312+
local_nonpersistent_flags+=("--external-host-internal-ip=")
43114313
flags+=("--external-host-partition-path=")
43124314
local_nonpersistent_flags+=("--external-host-partition-path=")
43134315
flags+=("--external-host-password=")
@@ -4316,6 +4318,8 @@ _openshift_admin_router()
43164318
local_nonpersistent_flags+=("--external-host-private-key=")
43174319
flags+=("--external-host-username=")
43184320
local_nonpersistent_flags+=("--external-host-username=")
4321+
flags+=("--external-host-vxlan-gw=")
4322+
local_nonpersistent_flags+=("--external-host-vxlan-gw=")
43194323
flags+=("--force-subdomain=")
43204324
local_nonpersistent_flags+=("--force-subdomain=")
43214325
flags+=("--host-network")
@@ -8905,6 +8909,8 @@ _openshift_cli_adm_router()
89058909
local_nonpersistent_flags+=("--external-host-https-vserver=")
89068910
flags+=("--external-host-insecure")
89078911
local_nonpersistent_flags+=("--external-host-insecure")
8912+
flags+=("--external-host-internal-ip=")
8913+
local_nonpersistent_flags+=("--external-host-internal-ip=")
89088914
flags+=("--external-host-partition-path=")
89098915
local_nonpersistent_flags+=("--external-host-partition-path=")
89108916
flags+=("--external-host-password=")
@@ -8913,6 +8919,8 @@ _openshift_cli_adm_router()
89138919
local_nonpersistent_flags+=("--external-host-private-key=")
89148920
flags+=("--external-host-username=")
89158921
local_nonpersistent_flags+=("--external-host-username=")
8922+
flags+=("--external-host-vxlan-gw=")
8923+
local_nonpersistent_flags+=("--external-host-vxlan-gw=")
89168924
flags+=("--force-subdomain=")
89178925
local_nonpersistent_flags+=("--force-subdomain=")
89188926
flags+=("--host-network")

contrib/completions/zsh/oadm

+4
Original file line numberDiff line numberDiff line change
@@ -4469,6 +4469,8 @@ _oadm_router()
44694469
local_nonpersistent_flags+=("--external-host-https-vserver=")
44704470
flags+=("--external-host-insecure")
44714471
local_nonpersistent_flags+=("--external-host-insecure")
4472+
flags+=("--external-host-internal-ip=")
4473+
local_nonpersistent_flags+=("--external-host-internal-ip=")
44724474
flags+=("--external-host-partition-path=")
44734475
local_nonpersistent_flags+=("--external-host-partition-path=")
44744476
flags+=("--external-host-password=")
@@ -4477,6 +4479,8 @@ _oadm_router()
44774479
local_nonpersistent_flags+=("--external-host-private-key=")
44784480
flags+=("--external-host-username=")
44794481
local_nonpersistent_flags+=("--external-host-username=")
4482+
flags+=("--external-host-vxlan-gw=")
4483+
local_nonpersistent_flags+=("--external-host-vxlan-gw=")
44804484
flags+=("--force-subdomain=")
44814485
local_nonpersistent_flags+=("--force-subdomain=")
44824486
flags+=("--host-network")

contrib/completions/zsh/oc

+4
Original file line numberDiff line numberDiff line change
@@ -4519,6 +4519,8 @@ _oc_adm_router()
45194519
local_nonpersistent_flags+=("--external-host-https-vserver=")
45204520
flags+=("--external-host-insecure")
45214521
local_nonpersistent_flags+=("--external-host-insecure")
4522+
flags+=("--external-host-internal-ip=")
4523+
local_nonpersistent_flags+=("--external-host-internal-ip=")
45224524
flags+=("--external-host-partition-path=")
45234525
local_nonpersistent_flags+=("--external-host-partition-path=")
45244526
flags+=("--external-host-password=")
@@ -4527,6 +4529,8 @@ _oc_adm_router()
45274529
local_nonpersistent_flags+=("--external-host-private-key=")
45284530
flags+=("--external-host-username=")
45294531
local_nonpersistent_flags+=("--external-host-username=")
4532+
flags+=("--external-host-vxlan-gw=")
4533+
local_nonpersistent_flags+=("--external-host-vxlan-gw=")
45304534
flags+=("--force-subdomain=")
45314535
local_nonpersistent_flags+=("--force-subdomain=")
45324536
flags+=("--host-network")

contrib/completions/zsh/openshift

+8
Original file line numberDiff line numberDiff line change
@@ -4469,6 +4469,8 @@ _openshift_admin_router()
44694469
local_nonpersistent_flags+=("--external-host-https-vserver=")
44704470
flags+=("--external-host-insecure")
44714471
local_nonpersistent_flags+=("--external-host-insecure")
4472+
flags+=("--external-host-internal-ip=")
4473+
local_nonpersistent_flags+=("--external-host-internal-ip=")
44724474
flags+=("--external-host-partition-path=")
44734475
local_nonpersistent_flags+=("--external-host-partition-path=")
44744476
flags+=("--external-host-password=")
@@ -4477,6 +4479,8 @@ _openshift_admin_router()
44774479
local_nonpersistent_flags+=("--external-host-private-key=")
44784480
flags+=("--external-host-username=")
44794481
local_nonpersistent_flags+=("--external-host-username=")
4482+
flags+=("--external-host-vxlan-gw=")
4483+
local_nonpersistent_flags+=("--external-host-vxlan-gw=")
44804484
flags+=("--force-subdomain=")
44814485
local_nonpersistent_flags+=("--force-subdomain=")
44824486
flags+=("--host-network")
@@ -9066,6 +9070,8 @@ _openshift_cli_adm_router()
90669070
local_nonpersistent_flags+=("--external-host-https-vserver=")
90679071
flags+=("--external-host-insecure")
90689072
local_nonpersistent_flags+=("--external-host-insecure")
9073+
flags+=("--external-host-internal-ip=")
9074+
local_nonpersistent_flags+=("--external-host-internal-ip=")
90699075
flags+=("--external-host-partition-path=")
90709076
local_nonpersistent_flags+=("--external-host-partition-path=")
90719077
flags+=("--external-host-password=")
@@ -9074,6 +9080,8 @@ _openshift_cli_adm_router()
90749080
local_nonpersistent_flags+=("--external-host-private-key=")
90759081
flags+=("--external-host-username=")
90769082
local_nonpersistent_flags+=("--external-host-username=")
9083+
flags+=("--external-host-vxlan-gw=")
9084+
local_nonpersistent_flags+=("--external-host-vxlan-gw=")
90779085
flags+=("--force-subdomain=")
90789086
local_nonpersistent_flags+=("--force-subdomain=")
90799087
flags+=("--host-network")

docs/man/man1/oadm-router.1

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ If a router does not exist with the given name, this command will create a deplo
5959
\fB\-\-external\-host\-insecure\fP=false
6060
If the underlying router implementation connects with an external host over a secure connection, this causes the router to skip strict certificate verification with the external host.
6161

62+
.PP
63+
\fB\-\-external\-host\-internal\-ip\fP=""
64+
If the underlying router implementation requires the use of a specific network interface to connect to the pod network, this is the IP address of that internal interface.
65+
6266
.PP
6367
\fB\-\-external\-host\-partition\-path\fP=""
6468
If the underlying router implementation uses partitions for control boundaries, this is the path to use for that partition.
@@ -75,6 +79,10 @@ If a router does not exist with the given name, this command will create a deplo
7579
\fB\-\-external\-host\-username\fP=""
7680
If the underlying router implementation connects with an external host, this is the username for authenticating with the external host.
7781

82+
.PP
83+
\fB\-\-external\-host\-vxlan\-gw\fP=""
84+
If the underlying router implementation requires VxLAN access to the pod network, this is the gateway address that should be used in cidr format.
85+
7886
.PP
7987
\fB\-\-force\-subdomain\fP=""
8088
A router path format to force on all routes used by this router (will ignore the route host value)

docs/man/man1/oc-adm-router.1

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ If a router does not exist with the given name, this command will create a deplo
5959
\fB\-\-external\-host\-insecure\fP=false
6060
If the underlying router implementation connects with an external host over a secure connection, this causes the router to skip strict certificate verification with the external host.
6161

62+
.PP
63+
\fB\-\-external\-host\-internal\-ip\fP=""
64+
If the underlying router implementation requires the use of a specific network interface to connect to the pod network, this is the IP address of that internal interface.
65+
6266
.PP
6367
\fB\-\-external\-host\-partition\-path\fP=""
6468
If the underlying router implementation uses partitions for control boundaries, this is the path to use for that partition.
@@ -75,6 +79,10 @@ If a router does not exist with the given name, this command will create a deplo
7579
\fB\-\-external\-host\-username\fP=""
7680
If the underlying router implementation connects with an external host, this is the username for authenticating with the external host.
7781

82+
.PP
83+
\fB\-\-external\-host\-vxlan\-gw\fP=""
84+
If the underlying router implementation requires VxLAN access to the pod network, this is the gateway address that should be used in cidr format.
85+
7886
.PP
7987
\fB\-\-force\-subdomain\fP=""
8088
A router path format to force on all routes used by this router (will ignore the route host value)

docs/man/man1/openshift-admin-router.1

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ If a router does not exist with the given name, this command will create a deplo
5959
\fB\-\-external\-host\-insecure\fP=false
6060
If the underlying router implementation connects with an external host over a secure connection, this causes the router to skip strict certificate verification with the external host.
6161

62+
.PP
63+
\fB\-\-external\-host\-internal\-ip\fP=""
64+
If the underlying router implementation requires the use of a specific network interface to connect to the pod network, this is the IP address of that internal interface.
65+
6266
.PP
6367
\fB\-\-external\-host\-partition\-path\fP=""
6468
If the underlying router implementation uses partitions for control boundaries, this is the path to use for that partition.
@@ -75,6 +79,10 @@ If a router does not exist with the given name, this command will create a deplo
7579
\fB\-\-external\-host\-username\fP=""
7680
If the underlying router implementation connects with an external host, this is the username for authenticating with the external host.
7781

82+
.PP
83+
\fB\-\-external\-host\-vxlan\-gw\fP=""
84+
If the underlying router implementation requires VxLAN access to the pod network, this is the gateway address that should be used in cidr format.
85+
7886
.PP
7987
\fB\-\-force\-subdomain\fP=""
8088
A router path format to force on all routes used by this router (will ignore the route host value)

docs/man/man1/openshift-cli-adm-router.1

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ If a router does not exist with the given name, this command will create a deplo
5959
\fB\-\-external\-host\-insecure\fP=false
6060
If the underlying router implementation connects with an external host over a secure connection, this causes the router to skip strict certificate verification with the external host.
6161

62+
.PP
63+
\fB\-\-external\-host\-internal\-ip\fP=""
64+
If the underlying router implementation requires the use of a specific network interface to connect to the pod network, this is the IP address of that internal interface.
65+
6266
.PP
6367
\fB\-\-external\-host\-partition\-path\fP=""
6468
If the underlying router implementation uses partitions for control boundaries, this is the path to use for that partition.
@@ -75,6 +79,10 @@ If a router does not exist with the given name, this command will create a deplo
7579
\fB\-\-external\-host\-username\fP=""
7680
If the underlying router implementation connects with an external host, this is the username for authenticating with the external host.
7781

82+
.PP
83+
\fB\-\-external\-host\-vxlan\-gw\fP=""
84+
If the underlying router implementation requires VxLAN access to the pod network, this is the gateway address that should be used in cidr format.
85+
7886
.PP
7987
\fB\-\-force\-subdomain\fP=""
8088
A router path format to force on all routes used by this router (will ignore the route host value)

pkg/cmd/admin/router/router.go

+28-16
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,14 @@ type RouterConfig struct {
183183
// the external host.
184184
ExternalHostPrivateKey string
185185

186+
// ExternalHostInternalIP specifies the IP address of the internal interface that is
187+
// used by the external host to connect to the pod network
188+
ExternalHostInternalIP string
189+
190+
// ExternalHostVxLANGateway specifies the gateway IP and mask (cidr) of the IP
191+
// address to be used to connect to the pod network from the external host
192+
ExternalHostVxLANGateway string
193+
186194
// ExternalHostInsecure specifies that the router should skip strict
187195
// certificate verification when connecting to the external host.
188196
ExternalHostInsecure bool
@@ -271,6 +279,8 @@ func NewCmdRouter(f *clientcmd.Factory, parentName, name string, out, errout io.
271279
cmd.Flags().StringVar(&cfg.ExternalHostHttpVserver, "external-host-http-vserver", cfg.ExternalHostHttpVserver, "If the underlying router implementation uses virtual servers, this is the name of the virtual server for HTTP connections.")
272280
cmd.Flags().StringVar(&cfg.ExternalHostHttpsVserver, "external-host-https-vserver", cfg.ExternalHostHttpsVserver, "If the underlying router implementation uses virtual servers, this is the name of the virtual server for HTTPS connections.")
273281
cmd.Flags().StringVar(&cfg.ExternalHostPrivateKey, "external-host-private-key", cfg.ExternalHostPrivateKey, "If the underlying router implementation requires an SSH private key, this is the path to the private key file.")
282+
cmd.Flags().StringVar(&cfg.ExternalHostInternalIP, "external-host-internal-ip", cfg.ExternalHostInternalIP, "If the underlying router implementation requires the use of a specific network interface to connect to the pod network, this is the IP address of that internal interface.")
283+
cmd.Flags().StringVar(&cfg.ExternalHostVxLANGateway, "external-host-vxlan-gw", cfg.ExternalHostVxLANGateway, "If the underlying router implementation requires VxLAN access to the pod network, this is the gateway address that should be used in cidr format.")
274284
cmd.Flags().BoolVar(&cfg.ExternalHostInsecure, "external-host-insecure", cfg.ExternalHostInsecure, "If the underlying router implementation connects with an external host over a secure connection, this causes the router to skip strict certificate verification with the external host.")
275285
cmd.Flags().StringVar(&cfg.ExternalHostPartitionPath, "external-host-partition-path", cfg.ExternalHostPartitionPath, "If the underlying router implementation uses partitions for control boundaries, this is the path to use for that partition.")
276286

@@ -631,22 +641,24 @@ func RunCmdRouter(f *clientcmd.Factory, cmd *cobra.Command, out, errout io.Write
631641
}
632642

633643
env := app.Environment{
634-
"ROUTER_SUBDOMAIN": cfg.Subdomain,
635-
"ROUTER_SERVICE_NAME": name,
636-
"ROUTER_SERVICE_NAMESPACE": namespace,
637-
"ROUTER_SERVICE_HTTP_PORT": "80",
638-
"ROUTER_SERVICE_HTTPS_PORT": "443",
639-
"ROUTER_EXTERNAL_HOST_HOSTNAME": cfg.ExternalHost,
640-
"ROUTER_EXTERNAL_HOST_USERNAME": cfg.ExternalHostUsername,
641-
"ROUTER_EXTERNAL_HOST_PASSWORD": cfg.ExternalHostPassword,
642-
"ROUTER_EXTERNAL_HOST_HTTP_VSERVER": cfg.ExternalHostHttpVserver,
643-
"ROUTER_EXTERNAL_HOST_HTTPS_VSERVER": cfg.ExternalHostHttpsVserver,
644-
"ROUTER_EXTERNAL_HOST_INSECURE": strconv.FormatBool(cfg.ExternalHostInsecure),
645-
"ROUTER_EXTERNAL_HOST_PARTITION_PATH": cfg.ExternalHostPartitionPath,
646-
"ROUTER_EXTERNAL_HOST_PRIVKEY": privkeyPath,
647-
"STATS_PORT": strconv.Itoa(cfg.StatsPort),
648-
"STATS_USERNAME": cfg.StatsUsername,
649-
"STATS_PASSWORD": cfg.StatsPassword,
644+
"ROUTER_SUBDOMAIN": cfg.Subdomain,
645+
"ROUTER_SERVICE_NAME": name,
646+
"ROUTER_SERVICE_NAMESPACE": namespace,
647+
"ROUTER_SERVICE_HTTP_PORT": "80",
648+
"ROUTER_SERVICE_HTTPS_PORT": "443",
649+
"ROUTER_EXTERNAL_HOST_HOSTNAME": cfg.ExternalHost,
650+
"ROUTER_EXTERNAL_HOST_USERNAME": cfg.ExternalHostUsername,
651+
"ROUTER_EXTERNAL_HOST_PASSWORD": cfg.ExternalHostPassword,
652+
"ROUTER_EXTERNAL_HOST_HTTP_VSERVER": cfg.ExternalHostHttpVserver,
653+
"ROUTER_EXTERNAL_HOST_HTTPS_VSERVER": cfg.ExternalHostHttpsVserver,
654+
"ROUTER_EXTERNAL_HOST_INSECURE": strconv.FormatBool(cfg.ExternalHostInsecure),
655+
"ROUTER_EXTERNAL_HOST_PARTITION_PATH": cfg.ExternalHostPartitionPath,
656+
"ROUTER_EXTERNAL_HOST_PRIVKEY": privkeyPath,
657+
"ROUTER_EXTERNAL_HOST_INTERNAL_ADDRESS": cfg.ExternalHostInternalIP,
658+
"ROUTER_EXTERNAL_HOST_VXLAN_GW_CIDR": cfg.ExternalHostVxLANGateway,
659+
"STATS_PORT": strconv.Itoa(cfg.StatsPort),
660+
"STATS_USERNAME": cfg.StatsUsername,
661+
"STATS_PASSWORD": cfg.StatsPassword,
650662
}
651663
if len(cfg.ForceSubdomain) > 0 {
652664
env["ROUTER_SUBDOMAIN"] = cfg.ForceSubdomain

0 commit comments

Comments
 (0)