Merge ~sergiodj/ubuntu-docker-images/+git/loki:promtail-config into ~ubuntu-docker-images/ubuntu-docker-images/+git/loki:2.4-22.04

Proposed by Sergio Durigan Junior
Status: Merged
Merged at revision: 9ece78bc75a40077e6d5132f9741008ebd5eaa4d
Proposed branch: ~sergiodj/ubuntu-docker-images/+git/loki:promtail-config
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/loki:2.4-22.04
Diff against target: 22 lines (+3/-1)
1 file modified
Dockerfile (+3/-1)
Reviewer Review Type Date Requested Status
Athos Ribeiro Needs Information
Bryce Harrington Pending
Canonical Server Pending
Review via email: mp+419230@code.launchpad.net

Description of the change

This MP's purpose is to install the promtail configuration file in the Loki ROCK image. This will bring the ROCK in sync with what we already do in the snap.

To post a comment you must log in.
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Hi Sergio, thanks for the MP!

The new configuration file contains a snap specific env var at

positions:
  filename: ${SNAP_COMMON}/positions.yaml

As you did with the loki.yaml file, that sed substitution should also apply here.

Other than that, this LGTM!

review: Needs Information
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Monday, April 11 2022, Athos Ribeiro wrote:

> Hi Sergio, thanks for the MP!
>
> The new configuration file contains a snap specific env var at
>
> positions:
> filename: ${SNAP_COMMON}/positions.yaml
>
> As you did with the loki.yaml file, that sed substitution should also apply here.

Ah, good catch. Sorry about that. Fixed now.

> Other than that, this LGTM!

Thank you! Merged.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Dockerfile b/Dockerfile
2index 9b2f6c5..30df8b8 100644
3--- a/Dockerfile
4+++ b/Dockerfile
5@@ -12,7 +12,8 @@ RUN set -eux; \
6 unsquashfs -d /snap/loki loki.snap; \
7 # The configuration file present in the snap makes use of
8 # snap-specific variables, so we have to remove them here.
9- sed -i 's/\${SNAP_COMMON}\(.*\)/\1/' /snap/loki/etc/loki/loki.yaml
10+ sed -i 's/\${SNAP_COMMON}\(.*\)/\1/' /snap/loki/etc/loki/loki.yaml; \
11+ sed -i 's/\${SNAP_COMMON}\(.*\)/\1/' /snap/loki/etc/loki/promtail-local-config.yaml
12
13 FROM ubuntu:jammy
14
15@@ -33,6 +34,7 @@ COPY --from=snap-installer /snap/loki/bin/loki /usr/bin/loki
16 COPY --from=snap-installer /snap/loki/bin/promtail /usr/bin/promtail
17 COPY --from=snap-installer /snap/loki/bin/logcli /usr/bin/logcli
18 COPY --from=snap-installer /snap/loki/etc/loki/loki.yaml /etc/loki/loki.yaml
19+COPY --from=snap-installer /snap/loki/etc/loki/promtail-local-config.yaml /etc/loki/promtail-local-config.yaml
20
21 # Copy the manifest files from the snap
22 COPY --from=snap-installer /snap/loki/snap/snapcraft.yaml /usr/share/rocks/

Subscribers

People subscribed via source and target branches