Merged
Conversation
c81fc70 to
5e28e72
Compare
5e28e72 to
9ee3d3c
Compare
awnumar
reviewed
Jan 8, 2025
Makefile
Outdated
| cd $$CONTROLLER_GEN_TMP_DIR ;\ | ||
| go mod init tmp ;\ | ||
| go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 ;\ | ||
| go get sigs.k8s.io/controller-tools/cmd/controller-gen@latest ;\ |
Member
There was a problem hiding this comment.
Do you think we should pin this to a specific hash?
Contributor
Author
There was a problem hiding this comment.
I've pinned this with this commit b8a2e9c
domgoodwin
previously approved these changes
Jan 8, 2025
controllers/configmap.go
Outdated
| // +kubebuilder:rbac:namespace=egress-operator-system,groups=core,resources=configmaps,verbs=get;list;watch;create;patch | ||
|
|
||
| var ( | ||
| logFields = &structpb.Struct{ |
Contributor
There was a problem hiding this comment.
Do these roughly match our service mesh ones?
Contributor
Author
There was a problem hiding this comment.
No, not exactly.
This is what we have for the service mesh
"start_time": "%START_TIME%",
"total_duration_ms": "%DURATION%",
"bytes_received": "%BYTES_RECEIVED%",
"bytes_sent": "%BYTES_SENT%",
"response_flags": "%RESPONSE_FLAGS%",
"destination_host": "%UPSTREAM_HOST%",
"destination_service": "%UPSTREAM_CLUSTER%",
"source_address": "%DOWNSTREAM_REMOTE_ADDRESS%",
"connection_id": "%CONNECTION_ID%",
"connection_termination_details": "%CONNECTION_TERMINATION_DETAILS%",
"requested_sni": "%REQUESTED_SERVER_NAME%",
"hostname": "%HOSTNAME%",
vs what's in this PR:
authority: '%REQ(:AUTHORITY)%'
bytes_received: '%BYTES_RECEIVED%'
bytes_sent: '%BYTES_SENT%'
connection_termination_details: '%CONNECTION_TERMINATION_DETAILS%'
downstream_local_address: '%DOWNSTREAM_LOCAL_ADDRESS%'
downstream_remote_address: '%DOWNSTREAM_REMOTE_ADDRESS%'
duration: '%DURATION%'
method: '%REQ(:METHOD)%'
path: '%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%'
protocol: '%PROTOCOL%'
requested_server_name: '%REQUESTED_SERVER_NAME%'
response_code: '%RESPONSE_CODE%'
response_code_details: '%RESPONSE_CODE_DETAILS%'
response_flags: '%RESPONSE_FLAGS%'
start_time: '%START_TIME%'
upstream_cluster: '%UPSTREAM_CLUSTER%'
upstream_host: '%UPSTREAM_HOST%'
upstream_local_address: '%UPSTREAM_LOCAL_ADDRESS%'
upstream_service_time: '%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%'
upstream_transport_failure_reason: '%UPSTREAM_TRANSPORT_FAILURE_REASON%'
user_agent: '%REQ(USER-AGENT)%'
awnumar
previously approved these changes
Jan 8, 2025
…ckwards compatibility
domgoodwin
approved these changes
Jan 9, 2025
awnumar
approved these changes
Jan 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'd like to emit access logs in JSON format so as to be able to improve their visibility in our OpenSearch index. In addition to this I made a number of changes:
controller-genExample pod logs showing admin logs and cluster access logs (admin logs left as default - but we can move these to JSON to if we want):
JSON access log (prettified):
{ "response_code": 0, "upstream_cluster": "example-www_TCP_443", "bytes_received": 1294, "bytes_sent": 5999, "downstream_local_address": "10.129.191.27:443", "duration": 445, "upstream_host": "93.184.215.14:443", "downstream_remote_address": "10.129.187.50:48990", "response_flags": "-", "start_time": "2025-01-08T14:12:19.041Z", "upstream_local_address": "10.129.191.27:37028" }