Skip to content

Commit

Permalink
Merge remote-tracking branch 'grafana/main' into karsten/first-over-time
Browse files Browse the repository at this point in the history
  • Loading branch information
jeschkies committed Jan 11, 2024
2 parents 48a1b8c + 5559b26 commit e70ccb5
Show file tree
Hide file tree
Showing 77 changed files with 1,116 additions and 217 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"image": "grafana/loki-build-image:0.29.0",
"image": "grafana/loki-build-image:0.33.0",
"containerEnv": {
"BUILD_IN_CONTAINER": "false"
},
Expand Down
2 changes: 1 addition & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {
],
};

local build_image_tag = '0.32.0';
local build_image_tag = '0.33.0';
[
pipeline('loki-build-image-' + arch) {
workspace: {
Expand Down
52 changes: 26 additions & 26 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:
dry_run: true
repo: grafana/loki-build-image
tags:
- 0.32.0-amd64
- 0.33.0-amd64
when:
event:
- pull_request
Expand All @@ -33,7 +33,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.32.0-amd64
- 0.33.0-amd64
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -68,7 +68,7 @@ steps:
dry_run: true
repo: grafana/loki-build-image
tags:
- 0.32.0-arm64
- 0.33.0-arm64
when:
event:
- pull_request
Expand All @@ -86,7 +86,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.32.0-arm64
- 0.33.0-arm64
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -118,7 +118,7 @@ steps:
password:
from_secret: docker_password
spec: .drone/docker-manifest-build-image.tmpl
target: loki-build-image:0.32.0
target: loki-build-image:0.33.0
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -182,14 +182,14 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: check-drone-drift
- commands:
- make BUILD_IN_CONTAINER=false check-generated-files
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: check-generated-files
- commands:
- cd ..
Expand All @@ -199,7 +199,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: clone-target-branch
when:
event:
Expand All @@ -210,14 +210,14 @@ steps:
- clone-target-branch
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: test
- commands:
- cd ../loki-target-branch && BUILD_IN_CONTAINER=false make test
depends_on:
- clone-target-branch
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: test-target-branch
when:
event:
Expand All @@ -230,7 +230,7 @@ steps:
- test
- test-target-branch
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: compare-coverage
when:
event:
Expand All @@ -248,7 +248,7 @@ steps:
TOKEN:
from_secret: github_token
USER: grafanabot
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: report-coverage
when:
event:
Expand All @@ -258,15 +258,15 @@ steps:
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: lint
- commands:
- make BUILD_IN_CONTAINER=false check-mod
depends_on:
- test
- lint
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: check-mod
- commands:
- apk add make bash && make lint-scripts
Expand All @@ -277,21 +277,21 @@ steps:
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: loki
- commands:
- make BUILD_IN_CONTAINER=false check-doc
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: check-doc
- commands:
- make BUILD_IN_CONTAINER=false check-format GIT_TARGET_BRANCH="$DRONE_TARGET_BRANCH"
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: check-format
when:
event:
Expand All @@ -301,14 +301,14 @@ steps:
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: validate-example-configs
- commands:
- make BUILD_IN_CONTAINER=false check-example-config-doc
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: check-example-config-doc
- commands:
- mkdir -p /hugo/content/docs/loki/latest
Expand Down Expand Up @@ -341,7 +341,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: loki-mixin-check
when:
event:
Expand All @@ -366,7 +366,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: documentation-helm-reference-check
trigger:
ref:
Expand Down Expand Up @@ -1772,15 +1772,15 @@ steps:
NFPM_SIGNING_KEY:
from_secret: gpg_private_key
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: write-key
- commands:
- make BUILD_IN_CONTAINER=false packages
environment:
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: test packaging
- commands:
- ./tools/packaging/verify-deb-install.sh
Expand All @@ -1806,7 +1806,7 @@ steps:
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: publish
when:
event:
Expand Down Expand Up @@ -1841,7 +1841,7 @@ steps:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
image: grafana/loki-build-image:0.31.2
image: grafana/loki-build-image:0.33.0
name: build and push
privileged: true
volumes:
Expand Down Expand Up @@ -2106,6 +2106,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 8ae9cff1a379503d0b568f727d9c12bcb486a5e8d1fc3271deea32f07939baf1
hmac: 30f2fb121d8271e00dc2ae8fe83a32e0e22fd2bd268609d0c3f295033fcd4fb6

...
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
env:
BUILD_IN_CONTAINER: false
container:
image: grafana/loki-build-image:0.32.0
image: grafana/loki-build-image:0.33.0
steps:
- uses: actions/checkout@v4
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DOCKER_IMAGE_DIRS := $(patsubst %/Dockerfile,%,$(DOCKERFILES))
BUILD_IN_CONTAINER ?= true

# ensure you run `make drone` after changing this
BUILD_IMAGE_VERSION ?= 0.31.2
BUILD_IMAGE_VERSION ?= 0.33.0

# Docker image info
IMAGE_PREFIX ?= grafana
Expand Down Expand Up @@ -836,14 +836,16 @@ dev-k3d-down:

# Trivy is used to scan images for vulnerabilities
.PHONY: trivy
trivy: loki-image
trivy: loki-image build-image
trivy i $(IMAGE_PREFIX)/loki:$(IMAGE_TAG)
trivy i $(IMAGE_PREFIX)/loki-build-image:$(IMAGE_TAG)
trivy fs go.mod

# Synk is also used to scan for vulnerabilities, and detects things that trivy might miss
.PHONY: snyk
snyk: loki-image
snyk container test $(IMAGE_PREFIX)/loki:$(IMAGE_TAG)
snyk: loki-image build-image
snyk container test $(IMAGE_PREFIX)/loki:$(IMAGE_TAG) --file=cmd/loki/Dockerfile
snyk container test $(IMAGE_PREFIX)/loki-build-image:$(IMAGE_TAG) --file=loki-build-image/Dockerfile
snyk code test

.PHONY: scan-vulnerabilities
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/docker-driver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.31.2
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.0
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/loki -f cmd/loki/Dockerfile .
Expand All @@ -9,7 +9,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false clients/cmd/docker-driver/docker-driver

FROM alpine:3.18.4
FROM alpine:3.18.5
RUN apk add --update --no-cache ca-certificates tzdata
COPY --from=build /src/loki/clients/cmd/docker-driver/docker-driver /bin/docker-driver
WORKDIR /bin/
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/docker-driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ To build and contribute. you will need:
To build the driver you can use `make docker-driver`, then you can install this driver using `make docker-driver-enable`.
If you want to uninstall the driver simply run `make docker-driver-clean`.

Make you update the [documentation](../../docs/sources/clients/docker-driver/) accordingly when submitting a new change.
Make sure you update the [documentation](../../docs/sources/send-data/docker-driver/) accordingly when submitting a new change.
2 changes: 1 addition & 1 deletion clients/cmd/promtail/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.29.3
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.0
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile .
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/promtail/Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile.debug .

FROM grafana/loki-build-image:0.29.3 as build
FROM grafana/loki-build-image:0.33.0 as build
ARG GOARCH="amd64"
COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false PROMTAIL_JOURNAL_ENABLED=true promtail-debug


FROM alpine:3.18.4
FROM alpine:3.18.5
RUN apk add --update --no-cache ca-certificates tzdata
COPY --from=build /src/loki/clients/cmd/promtail/promtail-debug /usr/bin/promtail-debug
COPY --from=build /usr/bin/dlv /usr/bin/dlv
Expand Down
2 changes: 1 addition & 1 deletion cmd/logcli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false logcli

FROM alpine:3.18.4
FROM alpine:3.18.5

RUN apk add --no-cache ca-certificates

Expand Down
2 changes: 1 addition & 1 deletion cmd/logql-analyzer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && CGO_ENABLED=0 go build ./cmd/logql-analyzer/

FROM alpine:3.18.4
FROM alpine:3.18.5

RUN apk add --no-cache ca-certificates

Expand Down
2 changes: 1 addition & 1 deletion cmd/loki-canary-boringcrypto/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /src/loki
RUN go env GOARCH > /goarch
RUN make clean && make GOARCH=$(cat /goarch) BUILD_IN_CONTAINER=true GOEXPERIMENT=boringcrypto loki-canary-boringcrypto

FROM alpine:3.18.4
FROM alpine:3.18.5
RUN apk add --update --no-cache ca-certificates
RUN apk add --no-cache libc6-compat
COPY --from=build /src/loki/cmd/loki-canary-boringcrypto/loki-canary-boringcrypto /usr/bin/loki-canary
Expand Down
2 changes: 1 addition & 1 deletion cmd/loki-canary/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false loki-canary

FROM alpine:3.18.4
FROM alpine:3.18.5
RUN apk add --update --no-cache ca-certificates
COPY --from=build /src/loki/cmd/loki-canary/loki-canary /usr/bin/loki-canary
ENTRYPOINT [ "/usr/bin/loki-canary" ]
4 changes: 2 additions & 2 deletions cmd/loki-canary/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.29.3
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.0
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f cmd/promtail/Dockerfile .
Expand All @@ -12,7 +12,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki-canary

FROM alpine:3.18.4
FROM alpine:3.18.5
RUN apk add --update --no-cache ca-certificates
COPY --from=build /src/loki/cmd/loki-canary/loki-canary /usr/bin/loki-canary
ENTRYPOINT [ "/usr/bin/loki-canary" ]
2 changes: 1 addition & 1 deletion cmd/loki/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false loki

FROM alpine:3.18.4
FROM alpine:3.18.5

RUN apk add --no-cache ca-certificates libcap

Expand Down
Loading

0 comments on commit e70ccb5

Please sign in to comment.