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

grpc access log with set filter state #10689

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

sheidkamp
Copy link

@sheidkamp sheidkamp commented Mar 7, 2025

Description

API changes

Code changes

CI changes

Docs changes

Context

Interesting decisions

Testing steps

Manual:

helm upgrade -i -n gloo-system gloo _test/gloo-1.0.0-ci1.tgz --create-namespace  --set accessLogger.enabled=true

kubectl apply -f https://raw.githubusercontent.com/solo-io/gloo/v1.13.x/example/petstore/petstore.yaml

kubectl apply -f - <<EOF
apiVersion: gateway.solo.io/v1
kind: Gateway
metadata:
  labels:
    app: gloo
  name: gateway-proxy
  namespace: gloo-system
spec:
  bindAddress: '::'
  bindPort: 8080
  httpGateway:
    options:
      setFilterState:
        onRequestHeaders:
        - formatString:
            textFormatSource:
              inlineString: "1"
          objectKey: envoy.ratelimit.hits_addend
          skipIfEmpty: false
  options:
    accessLoggingService:
      accessLog:
      - grpcService:
          filterStateObjectsToLog:
          - envoy.ratelimit.hits_addend
          logName: example
          staticClusterName: access_log_cluster
  proxyNames:
  - gateway-proxy
  ssl: false
  useProxyProto: false
EOF



kubectl apply -f - <<EOF
apiVersion: gateway.solo.io/v1
kind: VirtualService
metadata:
  name: basicroute
  namespace: gloo-system
spec:
  virtualHost:
    domains:
    - '*'
    routes:
    - matchers:
      - exact: /all-pets
      options:
        prefixRewrite: /api/pets
      routeAction:
        single:
          upstream:
            name: default-petstore-8080
            namespace: gloo-system
EOF
kubectl logs -f -n gloo-system deploy/gateway-proxy-access-logger
 curl -v localhost:8080/all-pets

Notes for reviewers

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Copy link

github-actions bot commented Mar 7, 2025

Visit the preview URL for this PR (updated for commit fb425ac):

https://gloo-edge--pr10689-sah-grpc-access-log-g62ocwmn.web.app

(expires Fri, 14 Mar 2025 21:16:41 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant