@@ -71,20 +71,23 @@ configuration reference for more information.
71
71
As mentioned in the proposal, there is an entire new section in the configuration:
72
72
``` yaml
73
73
ingress :
74
- httpErrorCodePages : <string>
75
- accessLogging : <Enable/Disable>
76
- httpCaptureHeaders :
77
- request :
78
- - maxLength : <integer. Min 1>
79
- name : <string regex: ^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$. Must comply with RFC 2616 section 4.2>
80
- response :
81
- - maxLength : <integer. Min 1>
82
- name : <string regex: ^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$. Must comply with RFC 2616 section 4.2>
83
- httpCaptureCookies :
84
- - matchType : <string. Can be Exact or Prefix>
85
- maxLength : <integer. Min 1, Max 1024>
86
- name : <string regex: ^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$. Must comply with RFC 6265 section 4.1>
87
- namePrefix : <string regex: ^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$. Must comply with RFC 6265 section 4.1>
74
+ httpErrorCodePages :
75
+ name : <string>
76
+ accessLogging :
77
+ status : <Enabled|Disabled>
78
+ format : <string>
79
+ httpCaptureHeaders :
80
+ request :
81
+ - maxLength : <integer>
82
+ name : <string>
83
+ response :
84
+ - maxLength : <integer>
85
+ name : <string>
86
+ httpCaptureCookies :
87
+ - matchType : <Exact|Prefix>
88
+ maxLength : <integer>
89
+ name : <string>
90
+ namePrefix : <string>
88
91
` ` `
89
92
90
93
For more information check each individual section.
@@ -119,28 +122,36 @@ logs from the router.
119
122
This approach does not require configuring rsyslogd in the host and is self
120
123
contained, not dedicating any resources in case it is not enabled.
121
124
122
- Configuring either of `ingress.httpCaptureHeaders` or
123
- ` ingress.httpCaptureCookies` will also enable `ingress.accessLogging`.
125
+ Configuring either of `ingress.accessLogging. httpCaptureHeaders` or
126
+ ` ingress.accessLogging. httpCaptureCookies` will also enable `ingress.accessLogging.status `.
124
127
125
- ` ingress.accessLogging` defaults to `Disable`.
128
+ ` ingress.accessLogging.status` defaults to `Disabled`.
129
+
130
+ # ### Configuring access log format
131
+ ` ingress.accessLogging.format` specifies the format of the log message for an
132
+ HTTP request. If this field is empty, log messages use the implementation's
133
+ default HTTP log format, which is described [here](http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3).
134
+
135
+ Note that this format only applies to cleartext and encryption terminated
136
+ requests.
126
137
127
138
# ### Configuring custom error code pages
128
139
To configure custom error code pages the user needs to specify a configmap name
129
- in `httpErrorCodePages`. This configmap must be in the `openshift-config`
130
- namespace and should have keys in the format of `error-page-<error code>.http`
131
- where `<error code>` is an HTTP status code.
140
+ in `ingress. httpErrorCodePages.name `. This configmap must be in the
141
+ ` openshift-config ` namespace and should have keys in the format of
142
+ ` error-page-<error code>.http ` where `<error code>` is an HTTP status code.
132
143
133
144
Each value in the configmap should be the full response, including HTTP
134
145
headers.
135
146
136
147
As of today, only errors for 503 and 404 can be customized.
137
148
138
- ` ingress.httpErrorCodePages` defaults to empty.
149
+ ` ingress.httpErrorCodePages.name ` defaults to empty.
139
150
140
151
# ### Capturing headers
141
152
To configure specific HTTP header capture so they are included in the access
142
- logs the user needs to create entries in `ingress.httpCaptureHeaders`. This
143
- field is a list and allows capturing request and response headers
153
+ logs the user needs to create entries in `ingress.accessLogging. httpCaptureHeaders`.
154
+ This field is a list and allows capturing request and response headers
144
155
independently. Each of the entries in the list has different parameters that
145
156
follow. If the list is empty (which is the default value) no headers will be
146
157
captured.
@@ -156,18 +167,18 @@ Each element of the list includes:
156
167
157
168
Both elements have the same fields :
158
169
* `maxLength`. Specifies a maximum length for the header value. If a header
159
- value exceeds this length, the value will be truncated in the log message.
170
+ value exceeds this length, the value will be truncated in the log message. Minimum value 1.
160
171
* `name`. Specifies a header name. Its value must be a valid HTTP header name
161
- as defined in RFC 2616 section 4.2.
172
+ as defined in RFC 2616 section 4.2. String regex ```^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$```.
162
173
163
174
If configured, it is mandatory to include at least `maxLength` and `name`.
164
175
165
- ` ingress.httpCaptureHeaders` defaults to an empty list.
176
+ ` ingress.accessLogging. httpCaptureHeaders` defaults to an empty list.
166
177
167
178
# ### Capturing cookies
168
179
To configure specific HTTP cookie capture so they are included in the access
169
- logs the user needs to create an entry in `ingress.httpCaptureCookies`. This
170
- field is a list (limited to 1 element) which includes information on which
180
+ logs the user needs to create an entry in `ingress.accessLogging. httpCaptureCookies`.
181
+ This field is a list (limited to 1 element) which includes information on which
171
182
cookie to capture. If the list is empty (which is the default value) no cookies
172
183
will be captured.
173
184
@@ -177,15 +188,17 @@ In each element of the list we find:
177
188
* `maxLength`. Specifies a maximum length of the string that will be logged,
178
189
which includes the cookie name, cookie value, and one-character delimiter.
179
190
If the log entry exceeds this length, the value will be truncated in the log
180
- message.
191
+ message. Minimum value 1, maximum value 1024.
181
192
* `name`. Specifies a cookie name. It must be a valid HTTP cookie name as
182
- defined in RFC 6265 section 4.1.
193
+ defined in RFC 6265 section 4.1. String regex ```^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$```.
194
+ Minimum length 0, maximum length 1024.
183
195
* `namePrefix`. Specifies a cookie name prefix. It must be a valid HTTP cookie
184
- name as defined in RFC 6265 section 4.1.
196
+ name as defined in RFC 6265 section 4.1. String regex ```^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$```.
197
+ Minimum length 0, maximum length 1024.
185
198
186
199
If configured, it is mandatory to include at least `matchType` and `maxLength`.
187
200
188
- ` ingress.httpCaptureCookies` defaults to an empty list.
201
+ ` ingress.accessLogging. httpCaptureCookies` defaults to an empty list.
189
202
190
203
# ### How config options change manifests
191
204
Each of the configuration options described above has a direct effect on the
@@ -203,7 +216,7 @@ enhancement.
203
216
N/A
204
217
205
218
# # Open Questions
206
- * Do we also allow configuring the access log format?
219
+ N/A
207
220
208
221
# # Test Plan
209
222
All configuration changes will be included in already existing e2e router
0 commit comments