-
Notifications
You must be signed in to change notification settings - Fork 16.8k
[stable/traefik] Allow enabling traefik access logs #1302
[stable/traefik] Allow enabling traefik access logs #1302
Conversation
Hi @kevinjqiu. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
stable/traefik/README.md
Outdated
@@ -115,6 +115,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 shold be in. Either common or json | `common` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/shold/should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, in the description field, please enclose the words "common" and "json" in backticks (as you've done in the default column) to make it clear these are actual values that may be used.
stable/traefik/values.yaml
Outdated
accessLogs: | ||
enabled: false | ||
filePath: "" # if empty, stdout is used | ||
format: "common" # choices are: common, json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, please remove quotes. Throughout the rest of this file, quotes aren't used in scenarios where they're optional.
stable/traefik/values.yaml
Outdated
@@ -42,6 +42,10 @@ service: | |||
# key: value | |||
gzip: | |||
enabled: true | |||
accessLogs: | |||
enabled: false | |||
filePath: "" # if empty, stdout is used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work, but elsewhere in the file, attributes with no default value are commented instead of being set to the empty string. It will have the same effect and will promote consistency within this file.
Great feature to be adding! Thanks for this! I registered just a couple nits, but overall, this is great. The one other thing I'd ask for is that you increment the minor version number of this chart in |
@krancour Updated the PR with your suggestions. Also incremented the chart's minor version. |
@krancour ok to test? |
Sorry for the delay. This LGTM. |
@viglesiasce, could you please make this ok to test? I'm unable to do that myself. |
The chart's version has gone up since this chart has been submitted. It's now 1.6.0, so this PR should probably go for |
@viglesiasce @kabakaev Fixed. |
@viglesiasce or @lachie83 can we merge this? |
/ok-to-test |
* upstream/master: (67 commits) Fix json whitespace (helm#1458) Use consistent whitespace in template placeholders (helm#1437) [stable/selenium] Make hub readiness probe timeout configurable (helm#1391) [stable/kube2iam]: add rbac support (helm#1286) [stable/traefik] Allow enabling traefik access logs (helm#1302) Add Stash chart (helm#1420) Add Gearman G2 chart (helm#1421) add option to include tolerations to daemonset (helm#1364) Moved Artifactory to stable and updated version to 5.3.2 (helm#1314) Concourse postgres conditional dependency (helm#1390) Typo in helm install command for dask-distributed (helm#1413) [stable/fluent-bit] Fluent Bit v0.11.12 (helm#1417) fixed cassandra chart's persistence bug (helm#1245) Prometheus: modify config to support k8s 1.6 by default (helm#1080) Add rocket.chat (helm#752) Fix influxdb deployment (helm#1424) feat(stable/etcd-operator): add support for supplying additional command args (helm#1418) add configurable service annotations helm#1234 (helm#1244) [stable/prometheus] extra environment variable for alert manager (helm#1237) [stable/heapster] Default service name to Heapster (helm#1266) ...
* Added `accessLogs` section for traefik config * Update Traefik chart README * Fix typos and format consistency issues * Increment Traefik chart minor version
By default, Traefik does not enable access logs, and currently there's no way to enable it using the Traefik chart.
This PR adds the
accessLogs
section to the Traefikconfigmap
if enabled.