Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/traefik] Allow enabling traefik access logs #1302

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/traefik/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: traefik
version: 1.6.0
version: 1.7.0
appVersion: 1.3.1
description: A Traefik based Kubernetes ingress controller with Let's Encrypt support
keywords:
Expand Down
3 changes: 3 additions & 0 deletions stable/traefik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ The following tables lists the configurable parameters of the Traefik chart and
| `gzip.enabled` | Whether to use gzip compression | `true` |
| `kubernetes.namespaces` | List of Kubernetes namespaces to watch | All namespaces |
| `kubernetes.labelSelector` | Valid Kubernetes ingress label selector to watch (e.g `realm=public`)| No label filter |
| `accessLogs.enabled` | Whether to enable Traefik's access logs | `false` |
| `accessLogs.filePath` | The path to the log file. Logs to stdout if omitted | None |
| `accessLogs.format` | What format the log entries should be in. Either `common` or `json` | `common` |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:

Expand Down
7 changes: 7 additions & 0 deletions stable/traefik/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ data:
labelselector = {{ .Values.kubernetes.labelSelector | quote }}
{{- end}}
{{- end}}
{{- if .Values.accessLogs.enabled }}
[accessLogs]
{{- if .Values.accessLogs.filePath }}
filePath = "{{ .Values.accessLogs.filePath }}"
{{- end}}
format = "{{ .Values.accessLogs.format }}"
{{- end}}
{{- if .Values.acme.enabled }}
[acme]
email = "{{ .Values.acme.email }}"
Expand Down
5 changes: 5 additions & 0 deletions stable/traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ service:
# key: value
gzip:
enabled: true
accessLogs:
enabled: false
## Path to the access logs file. If not provided, Traefik defaults it to stdout.
# filePath: ""
format: common # choices are: common, json
# Kubernetes ingress filters
#kubernetes:
# namespaces:
Expand Down