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