-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instrument the HAProxy router with metrics that contain route info #13337
Changes from all commits
db5b0fb
3e5c668
d33ed85
7a415aa
98fcab6
7ee65a8
ff133d4
3facf8e
1b0f7b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,8 @@ type RouterSelection struct { | |
DisableNamespaceOwnershipCheck bool | ||
|
||
EnableIngress bool | ||
|
||
ListenAddr string | ||
} | ||
|
||
// Bind sets the appropriate labels | ||
|
@@ -73,6 +75,7 @@ func (o *RouterSelection) Bind(flag *pflag.FlagSet) { | |
flag.BoolVar(&o.AllowWildcardRoutes, "allow-wildcard-routes", cmdutil.Env("ROUTER_ALLOW_WILDCARD_ROUTES", "") == "true", "Allow wildcard host names for routes") | ||
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.") | ||
flag.BoolVar(&o.EnableIngress, "enable-ingress", cmdutil.Env("ROUTER_ENABLE_INGRESS", "") == "true", "Enable configuration via ingress resources") | ||
flag.StringVar(&o.ListenAddr, "listen-addr", cmdutil.Env("ROUTER_LISTEN_ADDR", ""), "The name of an interface to listen on to expose metrics and health checking. If not specified, will not listen.") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Listen address seem a little general. How about metrics-listen-address? saw the above discussion. This needs to distinguish among the other listening ports. How about management-listening port? Or some such. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See the previous discussion between me and solly about why |
||
} | ||
|
||
// RouteSelectionFunc returns a func that identifies the host for a route. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
--listen-addr
is a bit generic-sounding -- shouldn't this be something like--metrics-listen-addr
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure - it's also the health check and debugging ports. This is consistent with what we do with the controller and kubelet, and wasn't inclined to be too different. Technically, any future API we expose from the routers themselves would be on this address, so it is the generic listen address on the process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's fair, I suppose