-
Notifications
You must be signed in to change notification settings - Fork 597
NE-2117: Add httpsLogFormat and tcpLogFormat to API #2773
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1495,13 +1495,29 @@ type AccessLogging struct { | |
| // +required | ||
| Destination LoggingDestination `json:"destination"` | ||
|
|
||
| // tcpLogFormat specifies the format of the log message for a TCP | ||
| // request. | ||
| // | ||
| // If this field is empty, log messages use the implementation's default | ||
| // TCP log format. For HAProxy's default TCP log format, see the | ||
| // HAProxy documentation: | ||
| // http//docs.haproxy.org/2.8/configuration.html#8.2.2 | ||
|
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. Fix broken HAProxy doc links and typo in field docs. Line 1504 and Line 1520 use Suggested doc fix- // http//docs.haproxy.org/2.8/configuration.html#8.2.2
+ // http://docs.haproxy.org/2.8/configuration.html#8.2.2
...
- // http//docs.haproxy.org/2.8/configuration.html#8.2.3
+ // http://docs.haproxy.org/2.8/configuration.html#8.2.3
...
- // httpsLogFormat specifies the format of the log messsage for an HTTPS
+ // httpsLogFormat specifies the format of the log message for an HTTPSAlso applies to: 1520-1520, 1531-1531 🤖 Prompt for AI Agents |
||
| // | ||
| // Note that this format only applies to TCP connections. It only affects | ||
| // the log format for TLS passthrough connections. | ||
| // | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=1024 | ||
| // +optional | ||
| TcpLogFormat string `json:"tcpLogFormat,omitempty"` | ||
|
|
||
| // httpLogFormat specifies the format of the log message for an HTTP | ||
| // request. | ||
| // | ||
| // If this field is empty, log messages use the implementation's default | ||
| // HTTP log format. For HAProxy's default HTTP log format, see the | ||
| // HAProxy documentation: | ||
| // http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3 | ||
| // http//docs.haproxy.org/2.8/configuration.html#8.2.3 | ||
| // | ||
| // Note that this format only applies to cleartext HTTP connections | ||
| // and to secure HTTP connections for which the ingress controller | ||
|
|
@@ -1512,6 +1528,24 @@ type AccessLogging struct { | |
| // +optional | ||
| HttpLogFormat string `json:"httpLogFormat,omitempty"` | ||
|
|
||
| // httpsLogFormat specifies the format of the log messsage for an HTTPS | ||
| // request. | ||
| // | ||
| // If this field is empty, log messages use the implementation's default | ||
| // HTTPS log format. For HAProxy's default HTTPS log format, see the | ||
| // HAProxy documentation: | ||
| // http://docs.haproxy.org/2.8/configuration.html#8.2.4 | ||
| // | ||
| // Note that this format only applies to HTTPS connections for which the | ||
| // ingress controller terminates encryption (that is, edge-terminated or | ||
| // reencrypt connections). It does not affect the log format for TLS | ||
| // passthrough connections. | ||
| // | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=1024 | ||
| // +optional | ||
| HttpsLogFormat string `json:"httpsLogFormat,omitempty"` | ||
|
|
||
| // httpCaptureHeaders defines HTTP headers that should be captured in | ||
| // access logs. If this field is empty, no headers are captured. | ||
| // | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/api
Length of output: 167
🏁 Script executed:
Repository: openshift/api
Length of output: 263
🏁 Script executed:
Repository: openshift/api
Length of output: 2592
🏁 Script executed:
Repository: openshift/api
Length of output: 39
🏁 Script executed:
Repository: openshift/api
Length of output: 3591
🏁 Script executed:
Repository: openshift/api
Length of output: 6179
🏁 Script executed:
Repository: openshift/api
Length of output: 257
Add feature gate annotation to the new log-format fields.
The
HTTPSLogFormatgate is registered in features.go, but the corresponding fields in theAccessLoggingstruct lack the required field-level annotation. Without+openshift:enable:FeatureGate=HTTPSLogFormatmarkers onTcpLogFormat,HttpLogFormat, andHttpsLogFormatfields inoperator/v1/types_ingress.go, the API will accept these fields regardless of the gate status.Add the annotation to each field:
(Similarly for
HttpLogFormatandHttpsLogFormat.)🤖 Prompt for AI Agents