@@ -71,20 +71,23 @@ configuration reference for more information.
7171As mentioned in the proposal, there is an entire new section in the configuration:
7272``` yaml
7373ingress :
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>
8891` ` `
8992
9093For more information check each individual section.
@@ -119,28 +122,36 @@ logs from the router.
119122This approach does not require configuring rsyslogd in the host and is self
120123contained, not dedicating any resources in case it is not enabled.
121124
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 `.
124127
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.
126137
127138# ### Configuring custom error code pages
128139To 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.
132143
133144Each value in the configmap should be the full response, including HTTP
134145headers.
135146
136147As of today, only errors for 503 and 404 can be customized.
137148
138- ` ingress.httpErrorCodePages` defaults to empty.
149+ ` ingress.httpErrorCodePages.name ` defaults to empty.
139150
140151# ### Capturing headers
141152To 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
144155independently. Each of the entries in the list has different parameters that
145156follow. If the list is empty (which is the default value) no headers will be
146157captured.
@@ -156,18 +167,18 @@ Each element of the list includes:
156167
157168Both elements have the same fields :
158169* `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.
160171* `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|~]+$```.
162173
163174If configured, it is mandatory to include at least `maxLength` and `name`.
164175
165- ` ingress.httpCaptureHeaders` defaults to an empty list.
176+ ` ingress.accessLogging. httpCaptureHeaders` defaults to an empty list.
166177
167178# ### Capturing cookies
168179To 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
171182cookie to capture. If the list is empty (which is the default value) no cookies
172183will be captured.
173184
@@ -177,15 +188,17 @@ In each element of the list we find:
177188* `maxLength`. Specifies a maximum length of the string that will be logged,
178189 which includes the cookie name, cookie value, and one-character delimiter.
179190 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.
181192* `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.
183195* `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.
185198
186199If configured, it is mandatory to include at least `matchType` and `maxLength`.
187200
188- ` ingress.httpCaptureCookies` defaults to an empty list.
201+ ` ingress.accessLogging. httpCaptureCookies` defaults to an empty list.
189202
190203# ### How config options change manifests
191204Each of the configuration options described above has a direct effect on the
@@ -203,7 +216,7 @@ enhancement.
203216N/A
204217
205218# # Open Questions
206- * Do we also allow configuring the access log format?
219+ N/A
207220
208221# # Test Plan
209222All configuration changes will be included in already existing e2e router
0 commit comments