projectcontour / contour

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

How to customize envoy access log #6676

Open shenshanyoumu opened 1 month ago

shenshanyoumu commented 1 month 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 1 month 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 1 month 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