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

Conversation

kevinjqiu
Copy link
Contributor

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 Traefik configmap if enabled.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 15, 2017
@k8s-ci-robot
Copy link
Contributor

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 @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 15, 2017
@@ -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` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/shold/should

Copy link
Contributor

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.

accessLogs:
enabled: false
filePath: "" # if empty, stdout is used
format: "common" # choices are: common, json
Copy link
Contributor

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.

@@ -42,6 +42,10 @@ service:
# key: value
gzip:
enabled: true
accessLogs:
enabled: false
filePath: "" # if empty, stdout is used
Copy link
Contributor

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.

@krancour
Copy link
Contributor

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 Chart.yaml.

@kevinjqiu
Copy link
Contributor Author

@krancour Updated the PR with your suggestions. Also incremented the chart's minor version.

@kevinjqiu
Copy link
Contributor Author

@krancour ok to test?

@krancour
Copy link
Contributor

Sorry for the delay. This LGTM.

@krancour
Copy link
Contributor

@viglesiasce, could you please make this ok to test? I'm unable to do that myself.

@kachkaev
Copy link
Contributor

kachkaev commented Jun 30, 2017

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 1.7.0.

@kevinjqiu
Copy link
Contributor Author

@viglesiasce @kabakaev Fixed.

@krancour
Copy link
Contributor

krancour commented Jul 6, 2017

@viglesiasce or @lachie83 can we merge this?

@viglesiasce
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 6, 2017
@viglesiasce viglesiasce merged commit cb43878 into helm:master Jul 6, 2017
@kevinjqiu kevinjqiu deleted the allow-enabling-traefik-access-logs branch July 6, 2017 22:46
lachie83 added a commit to lachie83/charts that referenced this pull request Jul 10, 2017
* 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)
  ...
yanns pushed a commit to yanns/charts that referenced this pull request Jul 28, 2017
* Added `accessLogs` section for traefik config

* Update Traefik chart README

* Fix typos and format consistency issues

* Increment Traefik chart minor version
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants