Skip to content

Commit 9f6145b

Browse files
committed
OSDOCS-11183: adds ingress control defaults MicroShift
1 parent 0290c0d commit 9f6145b

File tree

2 files changed

+161
-7
lines changed

2 files changed

+161
-7
lines changed

modules/microshift-config-parameters-table.adoc

Lines changed: 141 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
The following table explains {microshift-short} configuration YAML parameters and valid values for each:
1010

1111
.{microshift-short} `config.yaml` parameters
12-
[cols="3","20%,10%,70%",options="header"]
12+
[cols="1,2,3a","15%,10%,75%",options="header"]
1313
|===
1414
|Field|Type|Description
1515

@@ -50,7 +50,7 @@ The following table explains {microshift-short} configuration YAML parameters an
5050
|Optional. Add a list of explicit DNS names. Leading wildcards are allowed. If no names are provided, the implicit names are extracted from the certificates.
5151

5252
|`subjectAltNames`
53-
|Fully qualified domain names (FQDNs), wildcards such as `*.domain.com`, or IP addresses
53+
|Fully qualified domain names (FQDNs), wildcards such as `*.domain.com`, or IP addresses.
5454
|Subject Alternative Names for API server certificates. SANs indicate all of the domain names and IP addresses that are secured by a certificate.
5555

5656
|`debugging.logLevel`
@@ -65,27 +65,162 @@ The following table explains {microshift-short} configuration YAML parameters an
6565
|`number`
6666
|By default, `etcd` uses as much memory as needed to handle the load on the system. However, in memory constrained systems, it might be preferred or necessary to limit the amount of memory `etcd` can to use at a given time.
6767

68+
|`ingress.defaultHTTPVersion`
69+
|`number`
70+
|Determines the default HTTP version to be used for ingress. Default value is `1`, which is the HTTP/1.1 protocol.
71+
72+
|`ingress.forwardedHeaderPolicy`
73+
|`Append`, `Replace`, `IfNone`, `Never`
74+
|Specifies when and how the ingress router sets the `Forwarded`, `X-Forwarded-For`, `X-Forwarded-Host`, `X-Forwarded-Port`, `X-Forwarded-Proto`, and `X-Forwarded-Proto-Version` HTTP headers.
75+
76+
* `Append` specifies that the ingress router appends existing headers. `Append` is the default value.
77+
78+
* `Replace` specifies that the ingress router sets the headers and replaces any existing `Forwarded` or `X-Forwarded-*` headers.
79+
80+
* `IfNone` specifies that the ingress router sets headers if they are not already set.
81+
82+
* `Never` specifies that ingress router never sets the headers, preserving any existing headers.
83+
84+
|`ingress.httpCompression`
85+
|`object`
86+
|`httpCompression` defines a policy for HTTP traffic compression. There is no HTTP compression by default.
87+
88+
|`ingress.httpCompression.mimeTypes`
89+
|`array` or null
90+
|`mimeTypes` is a list of MIME types to compress. When the list is empty, the ingress controller does not apply any compression. To define a list, use the format of the Content-Type definition in RFC 1341 that specifies the type and subtype of data in the body of a message and the native encoding of the data. For example, `Content-Type := type \"/\" subtype *[\";\" parameter]`.
91+
92+
* The value of `Content-Type` can be one of the following types: application, audio, image, message, multipart, text, video, or a custom type preceded by `\"X-\"` and followed by a token. The token must be defined in one of the following ways:
93+
94+
* The token is a `string` of at least one character, and does not contain white spaces, control characters, or any of the characters in the `tspecials` set.
95+
96+
* The `tspecials` set contains the characters `()\u003c\u003e@,;:\\\"/[]?.=`.
97+
98+
* The subtype in Content-Type is also a token.
99+
100+
* The optional parameters following the subtype are defined as `token \"=\" (token / quoted-string)`.
101+
102+
* The `quoted-string`, as defined in RFC 822, is surrounded by double quotes and can contain white spaces plus any character except `\\`, `\"`, and `CR`. The `quoted-string` can also contain any single ASCII character if it is escaped by the following characters: `\\.",`.
103+
104+
Not all MIME types benefit from compression, but `HAProxy` uses resources to try to compress files when compression is configured. Generally speaking, text formats such as `html`, `ccs`, and `js` benefit from compression. Spending CPU resources to compress file types that are already compressed, such as images, audio, and video, is probably not worth the limited benefit.
105+
106+
|`ingress.httpEmptyRequestsPolicy`
107+
|`Respond` or `Ignore`
108+
|The default value is `Respond`. Describes how HTTP connections should be handled if the connection times out before a request is received. These connections typically come from the health probes of a load balancer service health or a web browser's speculative connections, such as a `preconnect`.
109+
110+
* If the field is set to `Respond`, the ingress controller sends an "HTTP 400" or "408" response, logs the connection if access logging is enabled, and counts the connection in the appropriate metrics.
111+
112+
* If the field is set to `Ignore`, the ingress controller closes the connection without sending a response, logging the connection, or incrementing metrics. Setting this field to `Ignore` might impede detection and diagnosis of problems or intrusions, especially when timed-out connections are caused by network errors or port scans. In both cases, logging empty requests can be useful for diagnosing errors and detecting intrusion attempts.
113+
68114
|`ingress.listenAddress`
69115
|IP address, NIC name, or multiple
70116
|Value defaults to the entire network of the host. The valid configurable value is a list that can be either a single IP address or NIC name or multiple IP addresses and NIC names.
71117

118+
|`ingress.logEmptyRequests`
119+
|`Log` or `Ignore`
120+
|Default value is `Log`. Specifies how connections on which empty requests are received are logged. These connections typically come from the health probes of a load balancer service health or a web browser's speculative connections, such as a `preconnect`. Logging typical requests might be undesirable, but requests can also be caused by network errors or port scans, in which case logging can be useful for diagnosing errors and detecting intrusion attempts.
121+
72122
|`ingress.ports.http`
73123
|`80`
74-
|Default port shown. Configurable. Valid value is a single, unique port in the 1-65535 range. The values of the `ports.http` and `ports.https` fields cannot be the same.
124+
|Default port shown. Configurable. Valid value is a single, unique port in the `1-65535` range. The values of the `ports.http` and `ports.https` fields cannot be the same.
75125

76126
|`ingress.ports.https`
77127
|`443`
78-
|Default port shown. Configurable. Valid value is a single, unique port in the 1-65535 range. The values of the `ports.http` and `ports.https` fields cannot be the same.
128+
|Default port shown. Configurable. Valid value is a single, unique port in the `1-65535` range. The values of the `ports.http` and `ports.https` fields cannot be the same.
79129

80-
|`ingress.routeAdmissionPolicy.
81-
namespaceOwnership`
130+
|`ingress.routeAdmissionPolicy.namespaceOwnership`
82131
|`Strict` or `InterNamespaceAllowed`
83132
|Describes how hostname claims across namespaces are handled. By default, allows routes to claim different paths of the same hostname across namespaces. Specifying `Strict` prevents routes in different namespaces from claiming the same hostname. If the value is deleted in a customized {microshift-short} `config.yaml`, the `InterNamespaceAllowed` value is automatically set.
84133

85134
|`ingress.status`
86135
|`Managed` or `Removed`
87136
|Router status. Default is `Managed`.
88137

138+
|`ingress.tuningOptions`
139+
|Objects
140+
|Specifies options for tuning the performance of ingress controller pods.
141+
142+
|`ingress.tuningOptions.clientFinTimeout`
143+
|`string` with format `duration`
144+
|Defines how long a connection is held open while waiting for a client response to the server/backend before closing the connection. The default timeout is `1s`, which is 1 second.
145+
146+
|`ingress.tuningOptions.clientTimeout`
147+
|`string` with format `duration`
148+
|Defines how long a connection is held open while waiting for a client response. The default timeout is `30s`, which is 30 seconds.
149+
150+
|`ingress.tuningOptions.headerBufferBytes`
151+
|An `integer` with the `format` of `int32`; `16384` is the minimum value when HTTP/2 is enabled.
152+
|Describes how much memory in bytes must be reserved for `IngressController` connection sessions. Default value is `32768` in bytes.
153+
154+
* Setting this field is generally not recommended because `headerBufferBytes` values that are too small can break the `IngressController` and `headerBufferBytes` values that are too large can cause the `IngressController` to use significantly more memory than necessary.
155+
156+
|`ingress.tuningOptions.headerBufferMaxRewriteBytes`
157+
|`integer`, formatted `int32`; `4096` is the minimum value
158+
|Describes how much memory in bytes must be reserved from `headerBufferBytes` for HTTP header rewriting and appending for `IngressController` connection sessions. Default value is `8192` bytes. Incoming HTTP requests are limited to the `headerBufferBytes` bytes minus the `headerBufferMaxRewriteBytes` bytes, meaning that the value of `headerBufferBytes` must be greater than the value of `headerBufferMaxRewriteBytes`.
159+
160+
* Setting this field is generally not recommended because `headerBufferMaxRewriteBytes` values that are too small can break the `IngressController` and `headerBufferMaxRewriteBytes` values that are too large can cause the `IngressController` to use significantly more memory than necessary.
161+
162+
|`ingress.tuningOptions.healthCheckInterval: ""`
163+
|`string` with pattern: `^(0\|([0-9]+(\\.[0-9]+)?(ns\|us\|µs\|μs\|ms\|s\|m\|h))+)$`
164+
|The default `healthCheckInterval` value is `5s`, which is 5 seconds. This parameter value defines how long the router waits between two consecutive health checks on the router's configured backends. Currently the minimum allowed value is `1s` and the maximum allowed value is `2147483647ms`, which is 24.85 days. The range might change in future releases.
165+
166+
* This value is applied globally as a default for all routes, but can be overridden per-route by the route annotation `router.openshift.io/haproxy.health.check.interval`.
167+
168+
* Requires an unsigned duration string of decimal numbers, each with an optional fraction and unit suffix, such as `300ms`, `1.5h` or `2h45m`. Valid time units are `ns`, `us` (or `µs` U+00B5 or `μs` U+03BC), `ms`, `s`, `m`, `h`.
169+
170+
* Setting this parameter value to less than `5s` can cause excess traffic due to too frequent TCP health checks and accompanying SYN packet storms.
171+
172+
* Setting this parameter value too high can result in increased latency because of backend servers that are no longer available, but have not yet been detected as such.
173+
174+
* An empty or `0` value means "no opinion" and the ingress controller chooses a default. Note that the default value might change in future releases.
175+
176+
|`ingress.tuningOptions.maxConnections`
177+
|`integer`, valid values are: `empty`, `0`, `-1`, and the range `2000-2000000`
178+
|Default value is `0`. defines the maximum number of simultaneous connections that can be established per `HAProxy` process. Increasing this value allows each ingress controller pod to handle more connections at the cost of additional system resources being consumed.
179+
180+
* If this field is empty or `0`, the `IngressController` uses the default value of `50000`, but the default is subject to change in future releases.
181+
182+
* If the value is `-1`, then `HAProxy` dynamically computes a maximum value based on the available resources set with `ulimit` values in the running container. Selecting `-1`, which means `auto`, results in a large value being computed, and therefore each `HAProxy` process incurs significant memory usage compared with the current default of `50000`.
183+
184+
* Setting a value that is greater than the current operating system limit prevents the `HAProxy` process from starting.
185+
186+
* You can monitor memory usage for router containers with the following metric:
187+
+
188+
[source,terminal]
189+
----
190+
container_memory_working_set_bytes{container=`router`,namespace=`openshift-ingress`}`
191+
----
192+
+
193+
* You can monitor memory usage of individual `HAProxy`processes in router containers with the following metric:
194+
+
195+
[source,terminal]
196+
----
197+
container_memory_working_set_bytes{container=`router`,namespace=`openshift-ingress`}/container_processes{container=`router`,namespace=`openshift-ingress`}
198+
----
199+
200+
|`ingress.tuningOptions.serverFinTimeout`
201+
|`string` in the format `duration`
202+
|Defines how long a connection is held open while waiting for a server or backend response to the client before closing the connection. The default timeout is `1s`.
203+
204+
|`ingress.tuningOptions.serverTimeout`
205+
|`string` in the format `duration`
206+
|Defines how long a connection is held open while waiting for a server or backend response. The default timeout is `30s`.
207+
208+
|`ingress.tuningOptions.threadCount`
209+
|`integer` in the form `int32`; minimum value is `1`, maximum is `64`
210+
|Defines the number of threads created per `HAProxy` process. The default value is `4`. If this field is empty, the default value is used.
211+
212+
* Setting this field is generally not recommended. Creating more threads allows each ingress controller pod to handle more connections at the cost of more system resources being used. Increasing the number of HAProxy threads allows the ingress controller pods to use more CPU time under load, potentially starving other pods if set too high. Conversely, reducing the number of threads may cause the ingress controller to perform poorly.
213+
214+
|`ingress.tuningOptions.tlsInspectDelay`
215+
|`string` in the format `duration`
216+
|Defines how long the router can hold data to find a matching route. Setting this interval with too short a value can cause the router to revert to the default certificate for edge-terminated clients or re-encrypt routes, even when a better-matching certificate could be used.
217+
218+
* The default inspect delay is `5s` which is 5 seconds, which is expected to be sufficient for most cases. Increasing the value of this configuration specifically for high-latency networks can cause a delay in finishing the SSL handshake. Any configured value must be transparent to your application.
219+
220+
|`ingress.tuningOptions.tunnelTimeout`
221+
|`string` in the format `duration`
222+
|Defines how long a tunnel connection, including websockets, are held open while the tunnel is idle. The default timeout is `1h`, which is 1 hour.
223+
89224
|`kubelet`
90225
|See the {microshift-short} low-latency instructions
91226
|Parameter for passthrough configuration of the kubelet node agent. Used for low-latency configuration. Default value is null.

modules/microshift-default-settings.adoc

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id="microshift-yaml-default_{context}"]
77
= Default settings
88

9-
If you do not create a `config.yaml` file, default values are used. The following example shows the default configuration settings.
9+
If you do not create a `config.yaml` file or use a configuration snippet YAML file, default values are used. The following example shows the default configuration settings.
1010

1111
* To see the default values, run the following command:
1212
+
@@ -38,14 +38,33 @@ dns:
3838
etcd:
3939
memoryLimitMB: 0
4040
ingress:
41+
defaultHTTPVersion: 1
42+
forwardedHeaderPolicy: ""
43+
httpCompression:
44+
mimeTypes:
45+
- ""
46+
httpEmptyRequestsPolicy: Respond
4147
listenAddress:
4248
- ""
49+
logEmptyRequests: Log
4350
ports:
4451
http: 80
4552
https: 443
4653
routeAdmissionPolicy:
4754
namespaceOwnership: InterNamespaceAllowed
4855
status: Managed
56+
tuningOptions:
57+
clientFinTimeout: ""
58+
clientTimeout: ""
59+
headerBufferBytes: 0
60+
headerBufferMaxRewriteBytes: 0
61+
healthCheckInterval: ""
62+
maxConnections: 0
63+
serverFinTimeout: ""
64+
serverTimeout: ""
65+
threadCount: 0
66+
tlsInspectDelay: ""
67+
tunnelTimeout: ""
4968
kubelet:
5069
manifests:
5170
kustomizePaths:

0 commit comments

Comments
 (0)