Skip to content

Commit 43bdad6

Browse files
authored
Merge branch 'master' into OffsetFetchRequest-version-issue
2 parents 00498a4 + 0e4b91c commit 43bdad6

File tree

1,290 files changed

+200
-442219
lines changed

Some content is hidden

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

1,290 files changed

+200
-442219
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Go
1515
uses: actions/setup-go@v4
1616
with:
17-
go-version: 1.20.4
17+
go-version: 1.23.0
1818
- name: Build Docker Image
1919
run: make push
2020
env:

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
## this will contain a matrix of all of the combinations
2020
## we wish to test again:
2121
matrix:
22-
go-version: [ 1.20.x ]
22+
go-version: [ 1.23.x ]
2323
os: [ ubuntu-latest ]
2424
runs-on: ${{ matrix.os }}
2525
steps:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@v4
1717
with:
18-
go-version: 1.20.4
18+
go-version: 1.23.0
1919
- uses: olegtarasov/[email protected]
2020
id: tagName
2121
- name: Release Docker Image

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Vendor dir is pulled from 'go mod 'vendor'
2+
vendor/
3+
go.sum
4+
15
# Binaries for programs and plugins
26
*.exe
37
*.dll
@@ -24,3 +28,5 @@ kafka_exporter
2428
# Test configuration
2529
test/
2630
.DS_Store
31+
32+

Makefile

+35-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ build: promu
3737

3838
crossbuild: promu
3939
@echo ">> crossbuilding binaries"
40-
@$(PROMU) crossbuild --go=1.20
40+
@$(PROMU) crossbuild --go=1.23
4141

4242
tarball: promu
4343
@echo ">> building release tarball"
@@ -101,6 +101,16 @@ lint: golangci-lint
101101
-E govet \
102102
-E errcheck
103103

104+
# Run gosec security checks
105+
.PHONY: sec
106+
sec: gosec
107+
@$(GOSEC) ./...
108+
109+
# Run staticcheck
110+
.PHONY: staticcheck
111+
staticcheck: staticcheck-bin
112+
@$(STATICCHECK) ./...
113+
104114
# find or download golangci-lint
105115
# download golangci-lint if necessary
106116
golangci-lint:
@@ -113,4 +123,27 @@ else
113123
GOLANG_LINT=$(shell which golangci-lint)
114124
endif
115125

116-
.PHONY: all style format build test vet tarball docker promu
126+
# Ensure gosec is installed
127+
gosec:
128+
ifeq (, $(shell which gosec))
129+
@GOOS=$(shell uname -s | tr A-Z a-z) \
130+
GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \
131+
$(GO) install github.com/securego/gosec/v2/cmd/gosec@latest
132+
GOSEC=$(shell go env GOPATH)/bin/gosec
133+
else
134+
GOSEC=$(shell which gosec)
135+
endif
136+
137+
# Ensure staticcheck is installed
138+
staticcheck-bin:
139+
ifeq (, $(shell which staticcheck))
140+
@GOOS=$(shell uname -s | tr A-Z a-z) \
141+
GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \
142+
$(GO) install honnef.co/go/tools/cmd/staticcheck@latest
143+
STATICCHECK=$(shell go env GOPATH)/bin/staticcheck
144+
else
145+
STATICCHECK=$(shell which staticcheck)
146+
endif
147+
148+
149+
.PHONY: all style format build test vet tarball docker promu sec staticcheck

charts/kafka-exporter/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ helm upgrade -i datadog datadog/datadog --namespace=kafka-exporter \
3131
```
3232

3333

34+
### Install with Azure Managed Prometheus support
35+
36+
```shell
37+
helm upgrade -i kafka-exporter kafka_exporter/charts/kafka-exporter --namespace=kafka-exporter --create-namespace \
38+
--set kafkaExporter.kafka.servers="{kafka1:9092,kafka2:9092,.....}" --set prometheus.serviceMonitor.enabled=true --set azuremanagedprometheus.use_azuremanagedprometheus=true
39+
```

go.mod

+34-36
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,50 @@
11
module github.com/danielqsj/kafka_exporter
22

3-
go 1.20
3+
go 1.23
44

55
require (
6-
github.com/Shopify/sarama v1.38.1
7-
github.com/alecthomas/kingpin/v2 v2.3.2
8-
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
6+
github.com/IBM/sarama v1.43.3
7+
github.com/alecthomas/kingpin/v2 v2.4.0
8+
github.com/krallistic/kazoo-go v0.0.0-20170526135507-a15279744f4e
9+
github.com/pkg/errors v0.9.1
10+
github.com/prometheus/client_golang v1.20.0
11+
github.com/prometheus/common v0.55.0
12+
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
13+
github.com/xdg/scram v1.0.5
14+
k8s.io/klog/v2 v2.130.1
15+
)
16+
17+
require (
18+
github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect
919
github.com/beorn7/perks v1.0.1 // indirect
10-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
20+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1121
github.com/davecgh/go-spew v1.1.1 // indirect
12-
github.com/eapache/go-resiliency v1.3.0 // indirect
13-
github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 // indirect
22+
github.com/eapache/go-resiliency v1.7.0 // indirect
23+
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
1424
github.com/eapache/queue v1.1.0 // indirect
15-
github.com/golang/protobuf v1.5.3 // indirect
25+
github.com/go-kit/log v0.2.1 // indirect
26+
github.com/go-logfmt/logfmt v0.6.0 // indirect
27+
github.com/go-logr/logr v1.4.2 // indirect
1628
github.com/golang/snappy v0.0.4 // indirect
29+
github.com/hashicorp/errwrap v1.1.0 // indirect
30+
github.com/hashicorp/go-multierror v1.1.1 // indirect
1731
github.com/hashicorp/go-uuid v1.0.3 // indirect
1832
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
1933
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
2034
github.com/jcmturner/gofork v1.7.6 // indirect
21-
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
35+
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
2236
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
23-
github.com/klauspost/compress v1.15.14 // indirect
24-
github.com/krallistic/kazoo-go v0.0.0-20170526135507-a15279744f4e
25-
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
26-
github.com/pkg/errors v0.9.1
27-
github.com/prometheus/client_golang v1.15.1
28-
github.com/prometheus/client_model v0.4.0 // indirect
29-
github.com/prometheus/common v0.44.0
30-
github.com/prometheus/procfs v0.9.0 // indirect
31-
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
32-
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da // indirect
33-
github.com/xdg/scram v1.0.3
37+
github.com/klauspost/compress v1.17.9 // indirect
38+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
39+
github.com/pierrec/lz4/v4 v4.1.21 // indirect
40+
github.com/prometheus/client_model v0.6.1 // indirect
41+
github.com/prometheus/procfs v0.15.1 // indirect
42+
github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414 // indirect
3443
github.com/xdg/stringprep v1.0.3 // indirect
35-
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
36-
golang.org/x/net v0.10.0 // indirect
37-
golang.org/x/sys v0.8.0 // indirect
38-
golang.org/x/text v0.9.0 // indirect
39-
google.golang.org/protobuf v1.30.0 // indirect
40-
)
41-
42-
require k8s.io/klog/v2 v2.100.1
43-
44-
require (
45-
github.com/go-kit/log v0.2.1 // indirect
46-
github.com/go-logfmt/logfmt v0.5.1 // indirect
47-
github.com/go-logr/logr v1.2.0 // indirect
48-
github.com/hashicorp/errwrap v1.0.0 // indirect
49-
github.com/hashicorp/go-multierror v1.1.1 // indirect
50-
github.com/pierrec/lz4/v4 v4.1.17 // indirect
5144
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
45+
golang.org/x/crypto v0.26.0 // indirect
46+
golang.org/x/net v0.28.0 // indirect
47+
golang.org/x/sys v0.24.0 // indirect
48+
golang.org/x/text v0.17.0 // indirect
49+
google.golang.org/protobuf v1.34.2 // indirect
5250
)

0 commit comments

Comments
 (0)