Skip to content

Commit

Permalink
don't mount /var/log as readonly (#314)
Browse files Browse the repository at this point in the history
* don't mount /var/log as readonly

* update phrasing in changelog to explain what the issue was
  • Loading branch information
rfratto authored Jan 8, 2021
1 parent 534b242 commit a565f2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ this platform. FreeBSD builds will return in a future release.
- [BUGFIX] Integrations will now function if the HTTP listen address was set to
a value other than the default. ([#206](https://github.com/grafana/agent/issues/206)) (@mattdurham)

- [BUGFIX] The default Loki installation will now be able to write its positions
file. This was prevented by accidentally writing to a readonly volume mount.
(@rfratto)

# v0.9.1 (2021-01-04)

NOTE: FreeBSD builds will not be included for this release. There is a bug in an
Expand Down
1 change: 0 additions & 1 deletion production/kubernetes/agent-loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ spec:
name: grafana-agent-logs
- mountPath: /var/log
name: varlog
readOnly: true
- mountPath: /var/lib/docker/containers
name: varlibdockercontainers
readOnly: true
Expand Down
5 changes: 3 additions & 2 deletions production/tanka/grafana-agent/v1/lib/loki.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ local container = k.core.v1.container;
container.mixin.securityContext.withRunAsUser(0),

agent+:
// For reading docker containers
k.util.hostVolumeMount('varlog', '/var/log', '/var/log', readOnly=true) +
// For reading docker containers. /var/log is used for the positions file
// and shouldn't be set to readonly.
k.util.hostVolumeMount('varlog', '/var/log', '/var/log') +
k.util.hostVolumeMount('varlibdockercontainers', '/var/lib/docker/containers', '/var/lib/docker/containers', readOnly=true) +

// For reading journald
Expand Down

0 comments on commit a565f2e

Please sign in to comment.