projectcontour / contour

Contour is a Kubernetes ingress controller using Envoy proxy.
https://projectcontour.io
Apache License 2.0
3.74k stars 682 forks source link

How to customize envoy access log #6676

Open shenshanyoumu opened 2 months ago

shenshanyoumu commented 2 months ago

What question do you have?: I follow docs: [https://projectcontour.io/getting-started/] with Option 3: Contour Gateway Provisioner to install contour in projectcontour namespace it works well;

but when I follow below docs to customized envoy access logs, where is config file I can found? https://projectcontour.io/docs/main/config/access-logging/#customizing-access-log-format

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

tsaarni commented 2 months ago

When using a gateway provisioner, Contour can be configured through ContourDeployment

kind: GatewayClass
apiVersion: gateway.networking.k8s.io/v1beta1
metadata:
  name: mygatewayclass
spec:
  controllerName: projectcontour.io/gateway-controller
  parametersRef:
    kind: ContourDeployment
    group: projectcontour.io
    name: contour-with-envoy-deployment-params
    namespace: projectcontour
---
kind: ContourDeployment
apiVersion: projectcontour.io/v1alpha1
metadata:
  namespace: projectcontour
  name: contour-with-envoy-deployment-params
spec:
  runtimeSettings:
    envoy:
      logging:
        accessLogFormat: json

For more information, refer to:

shenshanyoumu commented 2 months ago

When using a gateway provisioner, Contour can be configured through ContourDeployment

kind: GatewayClass
apiVersion: gateway.networking.k8s.io/v1beta1
metadata:
  name: mygatewayclass
spec:
  controllerName: projectcontour.io/gateway-controller
  parametersRef:
    kind: ContourDeployment
    group: projectcontour.io
    name: contour-with-envoy-deployment-params
    namespace: projectcontour
---
kind: ContourDeployment
apiVersion: projectcontour.io/v1alpha1
metadata:
  namespace: projectcontour
  name: contour-with-envoy-deployment-params
spec:
  runtimeSettings:
    envoy:
      logging:
        accessLogFormat: json

For more information, refer to:

Tnanks for your help, I will check docs

github-actions[bot] commented 1 week ago

The Contour project currently lacks enough contributors to adequately respond to all Issues.

This bot triages Issues according to the following rules:

You can:

Please send feedback to the #contour channel in the Kubernetes Slack