Skip to content
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

Inject new user agent into all kube rest configs #511

Merged
merged 1 commit into from
May 9, 2024

Conversation

RedbackThomson
Copy link
Member

@RedbackThomson RedbackThomson commented May 9, 2024

Description of your changes

  • Update UserAgent to be up-cli/<version> (<os>; <arch>)
  • Inject user agent into all kube rest clients
  • Add TODO to remove any references to the raw client config, where client.Client cannot be used

Example user agent: up-cli/v0.30.0-rc.0.15.g18bb4f5.dirty (darwin; arm64)

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

Running up ctx <path> makes multiple calls to spaces, and we can see the requests in the envoy logs:

{"downstreamLocalAddress":"10.88.4.252:8443","downstreamRemoteAddress":"10.138.0.37:0","protocol":"HTTP/1.1","startTime":"2024-05-09T23:03:29.593Z","upstreamHost":"10.96.29.179:8443","userAgent":"up-cli/v0.30.0-rc.0.15.g18bb4f5.dirty (darwin; arm64)","upstreamServiceTime":"14","path":"/api/v1","responseCode":200,"requestId":"","downstreamRequestTTLB":0,"bytesSent":192,"responseHeadersBytes":193,"authority":"upbound-gcp-us-west-1.space.mxe.upbound.services","responseFlags":"-","httpMethod":"GET","responseCodeDetails":"via_upstream","upstreamCluster":"mxe-api","upstreamDuration":16,"upstreamRequestTTLB":11,"downstreamResponseTTLB":0,"routeName":"mxe-api","responseTrailersBytes":0,"bytesReceived":0,"xForwardedFor":"10.138.0.37","clientDuration":16

internal/version/version.go Outdated Show resolved Hide resolved
@RedbackThomson RedbackThomson enabled auto-merge (squash) May 9, 2024 23:28
@RedbackThomson RedbackThomson merged commit d077815 into upbound:main May 9, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants