chore: switch promtails base image from debian to ubuntu (backport release-2.9.x) #15210
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 4d9c5bb from #15195
This PR changes promtails base image from
debian:12.8-slim
toubuntu:noble-20241015
,noble
being ubunutu's most recent lts version. The current debian base image has a lot of security CVEs that won't be updated, while ubuntu updates packages much more regularly.Just as a quick example, the result of a trivy scan on the promtail image with debian base gives
Total: 79 (UNKNOWN: 0, LOW: 59, MEDIUM: 14, HIGH: 5, CRITICAL: 1)
while the trivy scan for the promtail image with ubunutu base results inTotal: 15 (UNKNOWN: 0, LOW: 7, MEDIUM: 8, HIGH: 0, CRITICAL: 0)
EDIT: Moved to draft until I've confirmed the new image can still grab systemd/journal logsEDIT: Couldn't trace through the makefile/Dockerfile what needs to be set for the image to build with promtail and cgo locally, but given we publish images that can get logs from journal then the automation should be set up properly. If I enforce
CGO_ENABLED=1
for themake promtail-image
target locally, I can use that image to get logs via the journal scrape job.I ran promtail in a docker container with a scrape config like this:
I also mounted my machines
/var/log/journal
directory to the same path on the container, and set--network="host"
so that:would be able to send to loki running locally on my machine.
Then once both promtail in docker and loki locally are running, I added loki as a datasource to my local grafana as well.
In my journalctl logs I see:
and we can see the same in the logs that make it to loki
from promtail