Skip to content

Commit fdb8c5a

Browse files
committed
Merge branch 'main' into hotfix/configmap_parameter
2 parents e23920f + 4542341 commit fdb8c5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1479
-875
lines changed

.errcheck_excludes.txt

-1
This file was deleted.

.github/workflows/container.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
2626

2727
- name: Set up Go
28-
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
28+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
2929
with:
3030
go-version-file: go.mod
3131
check-latest: true
@@ -64,12 +64,12 @@ jobs:
6464
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
6565

6666
- name: Set up QEMU
67-
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
67+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
6868
with:
6969
platforms: amd64.arm64,arm
7070

7171
- name: Set up Docker Buildx
72-
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb
72+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
7373

7474
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
7575
with:
@@ -90,7 +90,7 @@ jobs:
9090
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
9191

9292
- name: Build and push Docker image
93-
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
93+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
9494
with:
9595
context: .
9696
push: ${{ github.repository == 'pyrra-dev/pyrra' && github.event_name != 'pull_request' }}

.github/workflows/dependabot-merge.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- name: Dependabot metadata
1414
id: metadata
15-
uses: dependabot/fetch-metadata@v1
15+
uses: dependabot/fetch-metadata@v2
1616
with:
1717
github-token: "${{ secrets.GITHUB_TOKEN }}"
1818
- name: Enable auto-merge for Dependabot PRs

.github/workflows/generate.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
name: Generate Jsonnet examples
1414
steps:
1515
- uses: actions/checkout@v4
16-
- uses: actions/setup-go@v5
16+
- uses: actions/setup-go@v5.1.0
1717
with:
1818
go-version-file: go.mod
19-
- uses: zendesk/setup-jsonnet@v11
19+
- uses: zendesk/setup-jsonnet@v12
2020
- run: go install github.com/brancz/gojsontoyaml@latest
2121
- run: make --always-make examples && git diff --exit-code

.github/workflows/go.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
name: Go
1818
steps:
1919
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
20-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
20+
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
2121
with:
2222
go-version-file: 'go.mod'
2323
- run: mkdir -p ui/build && touch ui/build/empty

.github/workflows/golangci-lint.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
23-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
23+
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
2424
with:
2525
go-version-file: 'go.mod'
2626
- name: Build UI
2727
run: make ui
2828
- name: golangci-lint
29-
uses: golangci/golangci-lint-action@v4.0.0
29+
uses: golangci/golangci-lint-action@v6.1.1
3030
with:
31+
args: --timeout=10m
3132
version: 'latest'

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
2828

2929
- name: Set up Go
30-
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
30+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
3131
with:
3232
go-version-file: go.mod
3333
check-latest: true
@@ -68,12 +68,12 @@ jobs:
6868
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
6969

7070
- name: Set up QEMU
71-
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
71+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
7272
with:
7373
platforms: amd64.arm64,arm
7474

7575
- name: Set up Docker Buildx
76-
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb
76+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
7777

7878
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
7979
with:
@@ -94,7 +94,7 @@ jobs:
9494
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
9595

9696
- name: Build and push Docker image
97-
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
97+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
9898
with:
9999
context: .
100100
push: true

.golangci.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
run:
2-
deadline: 5m
3-
go: 1.19
4-
skip-dirs:
5-
- proto/
2+
deadline: 10m
3+
go: 1.23
4+
5+
output:
6+
formats:
7+
- format: colored-line-number
68

79
linters:
810
enable:
@@ -14,6 +16,8 @@ linters:
1416
- whitespace
1517

1618
issues:
19+
exclude-dirs:
20+
- proto/
1721
exclude-rules:
1822
- path: _test.go
1923
linters:
@@ -39,7 +43,8 @@ linters-settings:
3943
- pkg: github.com/pkg/errors
4044
desc: "Use fmt.Errorf instead"
4145
errcheck:
42-
exclude: ./.errcheck_excludes.txt
46+
exclude-functions:
47+
- "(github.com/go-kit/log.Logger).Log"
4348
goimports:
4449
local-prefixes: github.com/pyrra-dev/pyrra
4550
gofumpt:

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Run the API binary in one terminal
4747
./pyrra api
4848
```
4949

50-
*Note: the API assumes a Prometheus is running on [localhost:9090](http://localhost:9090) and a backend on [localhost:9444](http://localhost:9444)) by default. Check `./bin/api --help` flag for the parameters to change those.*
50+
*Note: the API assumes a Prometheus is running on [localhost:9090](http://localhost:9090) and a backend on [localhost:9444](http://localhost:9444)) by default. Check `./pyrra api --help` flag for the parameters to change those.*
5151

5252
### Run a Kubernetes or filesystem backend
5353

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform="${BUILDPLATFORM:-linux/amd64}" docker.io/busybox:1.36.1 as builder
1+
FROM --platform="${BUILDPLATFORM:-linux/amd64}" docker.io/busybox:1.37.0 as builder
22

33
ARG TARGETOS TARGETARCH TARGETVARIANT
44

@@ -15,7 +15,7 @@ RUN if [ "${TARGETARCH}" = 'amd64' ]; then \
1515
fi
1616
RUN chmod +x pyrra
1717

18-
FROM --platform="${TARGETPLATFORM:-linux/amd64}" docker.io/alpine:3.19.1 AS runner
18+
FROM --platform="${TARGETPLATFORM:-linux/amd64}" docker.io/alpine:3.20.3 AS runner
1919
WORKDIR /
2020
COPY --chown=0:0 --from=builder /app/pyrra /usr/bin/pyrra
2121
USER 65533

Dockerfile.dev

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform="${BUILDPLATFORM:-linux/amd64}" docker.io/golang:1.22.2-alpine as go-builder
1+
FROM --platform="${BUILDPLATFORM:-linux/amd64}" docker.io/golang:1.23.3-alpine as go-builder
22

33
# renovate: datasource=go depName=github.com/go-delve/delve
44
ARG DLV_VERSION=v1.21.0
@@ -7,7 +7,7 @@ ARG DLV_VERSION=v1.21.0
77
RUN apk update && apk add --no-cache build-base
88
RUN go install "github.com/go-delve/delve/cmd/dlv@${DLV_VERSION}"
99

10-
FROM --platform="${BUILDPLATFORM:-linux/amd64}" docker.io/busybox:1.36.1 as builder
10+
FROM --platform="${BUILDPLATFORM:-linux/amd64}" docker.io/busybox:1.37.0 as builder
1111

1212
ARG TARGETOS TARGETARCH TARGETVARIANT
1313

@@ -24,7 +24,7 @@ RUN if [ "${TARGETARCH}" = 'amd64' ]; then \
2424
fi
2525
RUN chmod +x pyrra
2626

27-
FROM --platform="${TARGETPLATFORM:-linux/amd64}" docker.io/alpine:3.19.1 AS runner
27+
FROM --platform="${TARGETPLATFORM:-linux/amd64}" docker.io/alpine:3.20.3 AS runner
2828
WORKDIR /
2929
COPY --chown=0:0 --from=builder /app/pyrra /usr/bin/pyrra
3030
COPY --chown=0:0 --from=go-builder /go/bin/dlv /usr/bin/dlv

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ vet:
5555
# Generate manifests e.g. CRD, RBAC etc.
5656
.PHONY: generate
5757
generate: controller-gen gojsontoyaml ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
58-
$(CONTROLLER_GEN) rbac:roleName=pyrra-kubernetes crd rbac:roleName="pyrra-kubernetes" webhook paths="./..." output:crd:artifacts:config=jsonnet/controller-gen
58+
$(CONTROLLER_GEN) crd rbac:roleName="pyrra-kubernetes" webhook paths="./..." output:crd:artifacts:config=jsonnet/controller-gen
5959
find jsonnet/controller-gen -name '*.yaml' -print0 | xargs -0 -I{} sh -c '$(GOJSONTOYAML) -yamltojson < "$$1" | jq > "$(PWD)/jsonnet/controller-gen/$$(basename -s .yaml $$1).json"' -- {}
6060
find jsonnet/controller-gen -type f ! -name '*.json' -delete
6161

@@ -69,7 +69,7 @@ docker-push:
6969
# download controller-gen if necessary
7070
controller-gen:
7171
ifeq (, $(shell which controller-gen))
72-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.11.1
72+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0
7373
CONTROLLER_GEN=$(GOBIN)/controller-gen
7474
else
7575
CONTROLLER_GEN=$(shell which controller-gen)
@@ -99,3 +99,4 @@ examples/openshift/manifests: examples/openshift/main.jsonnet jsonnet/controller
9999
jsonnetfmt -i examples/openshift/main.jsonnet
100100
jsonnet -m examples/openshift/manifests examples/openshift/main.jsonnet | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml' -- {}
101101
find examples/openshift/manifests -type f ! -name '*.yaml' -delete
102+

examples/docker-compose/docker-compose.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ volumes:
99
services:
1010
prometheus:
1111
image: prom/prometheus:v2.47.0
12+
container_name: prometheus
1213
restart: always
1314
networks:
1415
- pyrra
@@ -18,12 +19,14 @@ services:
1819
- --config.file=/etc/prometheus/prometheus.yml
1920
- --storage.tsdb.path=/prometheus
2021
- --storage.tsdb.retention.time=33d
22+
- --web.enable-lifecycle
2123
volumes:
2224
- ./prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml:ro
23-
- ./prometheus_pyrra:/etc/prometheus/pyrra
25+
- prometheus_pyrra:/etc/prometheus/pyrra
2426

2527
pyrra-api:
2628
image: ghcr.io/pyrra-dev/pyrra:v0.7.5
29+
container_name: pyrra_api
2730
restart: always
2831
command:
2932
- api
@@ -37,6 +40,8 @@ services:
3740

3841
pyrra-filesystem:
3942
image: ghcr.io/pyrra-dev/pyrra:v0.7.5
43+
user: root
44+
container_name: pyrra_filesystem
4045
restart: always
4146
command:
4247
- filesystem
@@ -45,4 +50,4 @@ services:
4550
- pyrra
4651
volumes:
4752
- ./pyrra:/etc/pyrra
48-
- ./prometheus_pyrra:/etc/prometheus/pyrra
53+
- prometheus_pyrra:/etc/prometheus/pyrra

0 commit comments

Comments
 (0)