Skip to content

Commit 1fe1c87

Browse files
Add a new mimir.alerts.kubernetes component (#3448)
* Add a new mimir.alerts.kubernetes component * Sync Mimir periodically, test the case of a CRD deletion * Add TODOs * Longer test timeout * Check if pods are running * Apply suggestions from code review Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> * Fix metric doc * Fix changelog --------- Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
1 parent 2a49740 commit 1fe1c87

File tree

87 files changed

+3440
-93
lines changed

Some content is hidden

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

87 files changed

+3440
-93
lines changed

.github/ISSUE_TEMPLATE/blank.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ body:
7878
- loki.source.syslog
7979
- loki.source.windowsevent
8080
- loki.write
81+
- mimir.alerts.kubernetes
8182
- mimir.rules.kubernetes
8283
- otelcol.auth.basic
8384
- otelcol.auth.bearer

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ body:
7878
- loki.source.syslog
7979
- loki.source.windowsevent
8080
- loki.write
81+
- mimir.alerts.kubernetes
8182
- mimir.rules.kubernetes
8283
- otelcol.auth.basic
8384
- otelcol.auth.bearer

.github/ISSUE_TEMPLATE/docs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ body:
8181
- loki.source.syslog
8282
- loki.source.windowsevent
8383
- loki.write
84+
- mimir.alerts.kubernetes
8485
- mimir.rules.kubernetes
8586
- otelcol.auth.basic
8687
- otelcol.auth.bearer

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ body:
7878
- loki.source.syslog
7979
- loki.source.windowsevent
8080
- loki.write
81+
- mimir.alerts.kubernetes
8182
- mimir.rules.kubernetes
8283
- otelcol.auth.basic
8384
- otelcol.auth.bearer

.github/ISSUE_TEMPLATE/proposal.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ body:
7878
- loki.source.syslog
7979
- loki.source.windowsevent
8080
- loki.write
81+
- mimir.alerts.kubernetes
8182
- mimir.rules.kubernetes
8283
- otelcol.auth.basic
8384
- otelcol.auth.bearer
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Integration Tests on Kubernetes
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
run_tests:
13+
runs-on:
14+
labels: github-hosted-ubuntu-x64-large
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
- name: Setup Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
- name: Run tests
23+
run: make integration-test-k8s

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ v1.12.0-rc.1
7676
- The `otelcol.processor.servicegraph` component now supports defining the maximum number of buckets for generated exponential histograms.
7777
- See the upstream [core][https://github.com/open-telemetry/opentelemetry-collector/blob/v0.139.0/CHANGELOG.md] and [contrib][https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.139.0/CHANGELOG.md] changelogs for more details.
7878

79+
- A new `mimir.alerts.kubernetes` component which discovers `AlertmanagerConfig` Kubernetes resources and loads them into a Mimir instance. (@ptodev)
80+
7981
### Enhancements
8082

8183
- Add per-application rate limiting with the `strategy` attribute in the `faro.receiver` component, to prevent one application from consuming the rate limit quota of others. (@hhertout)

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ run-alloylint: alloylint
158158
# more for packages that exclude tests via //go:build !race due to known race detection issues. The
159159
# final command runs tests for syntax module.
160160
test:
161-
$(GO_ENV) go test $(GO_FLAGS) -race $(shell go list ./... | grep -v /integration-tests/)
161+
$(GO_ENV) go test $(GO_FLAGS) -race $(shell go list ./... | grep -v -E '/integration-tests/|/integration-tests-k8s/')
162162
$(GO_ENV) go test $(GO_FLAGS) ./internal/static/integrations/node_exporter
163163
$(GO_ENV) cd ./syntax && go test -race ./...
164164

@@ -180,6 +180,11 @@ test-pyroscope:
180180
cd ./internal/component/pyroscope/util/internal/cmd/playground/ && \
181181
$(GO_ENV) go build .
182182

183+
.PHONY: integration-test-k8s
184+
integration-test-k8s: alloy-image
185+
cd ./internal/cmd/integration-tests-k8s/ && \
186+
$(GO_ENV) go test -timeout 10m ./...
187+
183188
#
184189
# Targets for building binaries
185190
#

0 commit comments

Comments
 (0)