fix(infra-ingress): add field for access logging
This commit is contained in:
parent
85d398da55
commit
37c84787de
3 changed files with 40 additions and 0 deletions
28
infra-ingress/templates/traefik/flow.yaml
Normal file
28
infra-ingress/templates/traefik/flow.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{{- if and
|
||||||
|
(eq .Values.controller "traefik")
|
||||||
|
(.Capabilities.APIVersions.Has "logging.banzaicloud.io/v1beta1/Flow")
|
||||||
|
}}
|
||||||
|
---
|
||||||
|
apiVersion: logging.banzaicloud.io/v1beta1
|
||||||
|
kind: Flow
|
||||||
|
metadata:
|
||||||
|
name: traefik
|
||||||
|
spec:
|
||||||
|
match:
|
||||||
|
- select:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: traefik
|
||||||
|
filters:
|
||||||
|
- tag_normaliser: {}
|
||||||
|
- parser:
|
||||||
|
reserve_data: true
|
||||||
|
remove_key_name_field: true
|
||||||
|
parse:
|
||||||
|
type: json
|
||||||
|
time_key: "time"
|
||||||
|
time_type: "string"
|
||||||
|
time_format: "%iso8601"
|
||||||
|
hash_value_field: "traefik"
|
||||||
|
globalOutputRefs:
|
||||||
|
- "default"
|
||||||
|
{{- end }}
|
|
@ -109,6 +109,14 @@ spec:
|
||||||
isDefaultClass: true
|
isDefaultClass: true
|
||||||
rbac:
|
rbac:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
{{- else }}
|
||||||
|
logs:
|
||||||
|
general:
|
||||||
|
format: "json"
|
||||||
|
level: WARN
|
||||||
|
access:
|
||||||
|
enabled: {{ toYaml .Values.logs.access }}
|
||||||
|
format: "json"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
|
|
|
@ -50,6 +50,10 @@ commons:
|
||||||
controller: "traefik"
|
controller: "traefik"
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
|
logs:
|
||||||
|
access: false
|
||||||
|
|
||||||
traefik:
|
traefik:
|
||||||
ports: {}
|
ports: {}
|
||||||
hostPath: /srv/k8s/pv/pvc-traefik-certs
|
hostPath: /srv/k8s/pv/pvc-traefik-certs
|
||||||
|
|
Loading…
Add table
Reference in a new issue