-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to pass max-size and max-file to the docker driver #971
Conversation
@@ -129,6 +132,8 @@ To specify additional logging driver options, you can use the --log-opt NAME=VAL | |||
| `loki-tls-server-name` | No | | Name used to validate the server certificate. | |||
| `loki-tls-insecure-skip-verify` | No | `false` | Allow to skip tls verification. | |||
| `loki-proxy-url` | No | | Proxy URL use to connect to Loki. | |||
| `max-size` | No | -1 | The maximum size of the log before it is rolled. A positive integer plus a modifier representing the unit of measure (k, m, or g). Defaults to -1 (unlimited). This is used by json-log required to keep the `docker log` command working. |
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.
should we default to unlimited? I would think something like 100m might be a better default, since most people are not going to want unlimited file growth a default of unlimited would mean everyone needs to configure this flag?
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 is the default for docker driver. https://docs.docker.com/config/containers/logging/json-file/
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.
Though I'm not against doing a better job.
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.
I think it makes sense to match the defaults of docker to remain consistent, although I don't feel strongly about this one way or the other
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.
👍
…ex-lookups"" This reverts commit 8b74f9053037c4590ec1512b65288e4869d5e748. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This allows docker driver users to control
max-file
andmax-size
of the json-log driver used by Loki driver.I didn't remove the json-log as it allows users to keep using
docker logs
in combination of Loki driver.What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #966
Special notes for your reviewer:
Checklist