You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disables the namespace ownership checks for a route host with different paths or for overlapping host names in the case of wildcard routes. Please be aware that if namespace ownership checks are disabled, routes in a different namespace can use this mechanism to 'steal' sub\-paths for existing domains. This is only safe if route creation privileges are restricted, or if all the users can be trusted.
Disables the namespace ownership checks for a route host with different paths or for overlapping host names in the case of wildcard routes. Please be aware that if namespace ownership checks are disabled, routes in a different namespace can use this mechanism to 'steal' sub\-paths for existing domains. This is only safe if route creation privileges are restricted, or if all the users can be trusted.
95
95
96
+
.PP
97
+
\fB\-\-enable\-ingress\fP=false
98
+
Enable configuration via ingress resources
99
+
96
100
.PP
97
101
\fB\-\-extended\-validation\fP=true
98
102
If set, then an additional extended validation step is performed on all routes admitted in by this router. Defaults to true and enables the extended validation checks.
Copy file name to clipboardExpand all lines: pkg/cmd/infra/router/router.go
+8-1
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,8 @@ type RouterSelection struct {
54
54
AllowWildcardRoutesbool
55
55
56
56
DisableNamespaceOwnershipCheckbool
57
+
58
+
EnableIngressbool
57
59
}
58
60
59
61
// Bind sets the appropriate labels
@@ -70,6 +72,7 @@ func (o *RouterSelection) Bind(flag *pflag.FlagSet) {
70
72
flag.StringSliceVar(&o.AllowedDomains, "allowed-domains", envVarAsStrings("ROUTER_ALLOWED_DOMAINS", "", ","), "List of comma separated domains to allow in routes. If specified, only the domains in this list will be allowed routes. Note that domains in the denied list take precedence over the ones in the allowed list")
flag.BoolVar(&o.DisableNamespaceOwnershipCheck, "disable-namespace-ownership-check", cmdutil.Env("ROUTER_DISABLE_NAMESPACE_OWNERSHIP_CHECK", "") =="true", "Disables the namespace ownership checks for a route host with different paths or for overlapping host names in the case of wildcard routes. Please be aware that if namespace ownership checks are disabled, routes in a different namespace can use this mechanism to 'steal' sub-paths for existing domains. This is only safe if route creation privileges are restricted, or if all the users can be trusted.")
75
+
flag.BoolVar(&o.EnableIngress, "enable-ingress", cmdutil.Env("ROUTER_ENABLE_INGRESS", "") =="true", "Enable configuration via ingress resources")
73
76
}
74
77
75
78
// RouteSelectionFunc returns a func that identifies the host for a route.
@@ -81,10 +84,14 @@ func (o *RouterSelection) RouteSelectionFunc() controller.RouteHostFunc {
81
84
if!o.OverrideHostname&&len(route.Spec.Host) >0 {
82
85
returnroute.Spec.Host
83
86
}
87
+
// GetNameForHost returns the ingress name for a generated route, and the route route
88
+
// name otherwise. When a route and ingress in the same namespace share a name, the
89
+
// route and the ingress' rules should receive the same generated host.
0 commit comments