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
{{ message }}
Repository navigation
Commit fdf748a
Browse filesBrowse the repository at this point in the historyBrowse files
HAProxy now runs on a sidecar container, using a distinct image from the
router one. This update is removing the HAProxy installation from the
router image. The reload script is also being removed, along with any
configuration pointing to it, like envvar in the router image and dev
documentation.
The --reload command-line option is still supported, so this does not
change the expectation of the nginx plugin. Providing a script however
is optional if the HAProxy admin unix socket is provided.
Hacking documentation for running the router locally is also updated.
Jira: https://redhat.atlassian.net/browse/NE-2816
@@ -129,4 +135,3 @@ Here is the VSCode launch configuration that starts OpenShift router in debug mo
129
135
Caveats:
130
136
131
137
1. On debug mode, the binary name is not `openshift-router`, making the bootstrap code to fail. Temporarily patch `cmd/openshift-router/main.go` and hardcode `openshift-router` in the `CommandFor()` call.
132
-
1. A haproxy instance should be left behind depending on how the router is stopped. Run `killall haproxy` in case the router complains when trying to listen to sockets.
Copy file name to clipboardExpand all lines: pkg/cmd/infra/router/template.go
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,7 @@ type TemplateRouter struct {
111
111
WorkingDirstring
112
112
TemplateFilestring
113
113
ReloadScriptstring
114
+
HAProxyAdminUnixSocketstring
114
115
ReloadInterval time.Duration
115
116
DefaultCertificatestring
116
117
DefaultCertificatePathstring
@@ -172,6 +173,7 @@ func (o *TemplateRouter) Bind(flag *pflag.FlagSet) {
172
173
flag.StringVar(&o.DefaultDestinationCAPath, "default-destination-ca-path", env("DEFAULT_DESTINATION_CA_PATH", ""), "A path to a PEM file containing the default CA bundle to use with re-encrypt routes. This CA should sign for certificates in the Kubernetes DNS space (service.namespace.svc).")
173
174
flag.StringVar(&o.TemplateFile, "template", env("TEMPLATE_FILE", ""), "The path to the template file to use")
174
175
flag.StringVar(&o.ReloadScript, "reload", env("RELOAD_SCRIPT", ""), "The path to the reload script to use")
176
+
flag.StringVar(&o.HAProxyAdminUnixSocket, "haproxy-admin-unix-socket", env("ROUTER_HAPROXY_ADMIN_UNIX_SOCKET", ""), "The path to the HAProxy admin unix socket")
175
177
flag.DurationVar(&o.ReloadInterval, "interval", getIntervalFromEnv("RELOAD_INTERVAL", defaultReloadInterval), "Controls how often router reloads are invoked. Mutiple router reload requests are coalesced for the duration of this interval since the last reload time.")
176
178
flag.BoolVar(&o.BindPortsAfterSync, "bind-ports-after-sync", env("ROUTER_BIND_PORTS_AFTER_SYNC", "") =="true", "Bind ports only after route state has been synchronized")
177
179
flag.StringVar(&o.MaxConnections, "max-connections", env("ROUTER_MAX_CONNECTIONS", ""), "Specifies the maximum number of concurrent connections.")
@@ -552,8 +554,8 @@ func (o *TemplateRouterOptions) Validate() error {
552
554
returnfmt.Errorf("unable to load default destination CA certificate: %v", err)
553
555
}
554
556
}
555
-
iflen(o.ReloadScript) ==0 {
556
-
returnerrors.New("reload script must be specified")
0 commit comments