Skip to content

Commit

Permalink
[stable/traefik] Allow enabling traefik access logs (helm#1302)
Browse files Browse the repository at this point in the history
* Added `accessLogs` section for traefik config

* Update Traefik chart README

* Fix typos and format consistency issues

* Increment Traefik chart minor version
  • Loading branch information
kevinjqiu authored and Vic Iglesias committed Jul 6, 2017
1 parent 9a79e0e commit 5b482a4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
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

0 comments on commit 5b482a4

Please sign in to comment.