-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS-10893: Enabling the dynamic configuration manager #86283
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
Changes from all commits
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// * networking/routes/route-configuration.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="nw-ne-dynamic-config-manager_{context}"] | ||
= Enabling the dynamic configuration manager | ||
|
||
You can enable the dynamic configuration manager for your template routers (like HAProxy). | ||
|
||
.Procedure | ||
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. The whole procedure seems to be coming from the old docs of OCP 3.11. The dynamic configuration manager is now enabled by default but only when TechPreview featureset is used. So, it's a techpreview feature. 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. After a discussion with the team. We think that may be a release notes update similar to this one would be enough. 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. Thanks! I'm happy to do that. While working on this, I noticed that there seems to be a lot of HAProxy and router environment variable information that appears in the 3.x documentation but not in the 4.x documentation. Would creating a 4.x document similar to the following be something we should consider for the 4.19 release: https://docs.openshift.com/container-platform/3.11/install_config/router/default_haproxy_router.html 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.
No, those were the variables available in 3.11. We consider DCM as an implementation detail in 4.18, without any supported configuration option. |
||
|
||
. Enable the HAProxy Config Manager. | ||
+ | ||
Set the UseHAProxyConfigManager flag to true in your TemplateRouterConfigManager. | ||
|
||
. Set the Commit Interval. | ||
+ | ||
Define the interval at which the router commits changes using the CommitInterval option. The default value is set to 60 * 60 seconds (1 hour). | ||
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. Should we add a note on the impact of changing the commit interval? Correct me if I am wrong, shorter intervals might increase resource usage while longer ones could delay changes. 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. The commit interval set to very low values (seconds, minutes) may cancel out all advantages of the dynamic configuration manager. Because the commit leads to the router reload which may increase the memory consumption as you mentioned. In OCP 4.18 release we don't expose any knob (even unsupported) to change the commit interval. So, its value remains an opinionated engineering decision. |
||
|
||
. Configure Dynamic Servers Pool. | ||
+ | ||
Adjust the size of the dynamic servers pool using the MaxDynamicServers option or the ROUTER_MAX_DYNAMIC_SERVERS environment variable. | ||
|
||
. Pre-allocate the blueprint pool of routes. | ||
+ | ||
Define a pool of routes (known as blueprints) using the BlueprintRoutePoolSize option or the ROUTER_BLUEPRINT_ROUTE_POOL_SIZE environment variable. | ||
+ | ||
. Customize blueprints (optional). | ||
+ | ||
Set the BlueprintRouteNamespace and BlueprintRouteLabelSelector options to select routes from a specific namespace matching certain labels. | ||
|
||
For example, enable the dynamic configuration manager in your router deployment or ConfigMap by setting these options as follows: | ||
|
||
[source,yaml] | ||
---- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: my-router-config | ||
data: | ||
useHAProxyConfigManager: "true" <1> | ||
commitInterval: "3600" <2> | ||
maxDynamicServers: "20" <3> | ||
blueprintRoutePoolSize: "10" <4> | ||
blueprintRouteNamespace: "my-namespace" <5> | ||
blueprintRouteLabelSelector: "my-label=my-value" <6> | ||
---- | ||
<1> Enable the UseHAProxyConfigManager. | ||
<2> Set the commit interval. | ||
<3> Configure the dynamic servers pool. | ||
<4> Pre-allocate the blueprints pool of routes. | ||
<5> Customize blueprint namespace (optional). | ||
<6> Customize blueprint label selector (optional). | ||
|
||
Alternatively, you can set these values using environment variables in your router deployment: | ||
|
||
[source,yaml] | ||
---- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: my-router | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: router | ||
env: | ||
- name: USE_HAPROXY_CONFIG_MANAGER <1> | ||
value: "true" | ||
- name: COMMIT_INTERVAL <2> | ||
value: "3600" | ||
- name: ROUTER_MAX_DYNAMIC_SERVERS <3> | ||
value: "20" | ||
- name: ROUTER_BLUEPRINT_ROUTE_POOL_SIZE <4> | ||
value: "10" | ||
---- | ||
<1> Enable the UseHAProxyConfigManager. | ||
<2> Set the commit interval. | ||
<3> Configure the dynamic servers pool. | ||
<4> Pre-allocate the blueprints pool of routes. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
:_mod-docs-content-type: ASSEMBLY | ||
[id="configuring-ingress-cluster-traffic-ingress-controller"] | ||
= Configuring ingress cluster traffic using an Ingress Controller | ||
include::_attributes/common-attributes.adoc[] | ||
:context: configuring-ingress-cluster-traffic-ingress-controller | ||
|
||
toc::[] | ||
|
||
By default, the router uses a dynamic configuration manager to propagate endpoint changes using dynamic HAPRoxy API. This approach allows the router to adapt to changes efficiently reducing the number of reloads needed and hence the memory footprint. The dynamic configuration manager uses the HAProxy dynamic API to modify the operational state of HAProxy backends. Endpoint changes, such as scaling up and down, are managed by provisioning each backend with a pool of dynamic servers. | ||
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. 🤖 [error] RedHat.TermsErrors: Use 'therefore' rather than 'hence'. For more information, see RedHat.TermsErrors. |
||
|
||
//Enabling the dynamic configuration manager | ||
include::modules/nw-ne-dynamic-config-manager.adoc[leveloffset=+1] |
Uh oh!
There was an error while loading. Please reload this page.