Skip to content

Commit e62408c

Browse files
committed
kafka 3.8 / 3.9
1 parent 71d0761 commit e62408c

20 files changed

+87
-63
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.19 as builder
1+
FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.19 AS builder
22
RUN apk add alpine-sdk ca-certificates
33

44
ARG TARGETOS

Dockerfile.all

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.19 as builder
1+
FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.19 AS builder
22
RUN apk add alpine-sdk ca-certificates
33

44
ARG TARGETOS

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ VERSION ?= $(shell git describe --tags --always --dirty)
1010
GOPKGS = $(shell go list ./... | grep -v /vendor/)
1111
BUILD_FLAGS ?=
1212
LDFLAGS ?= -X github.com/grepplabs/kafka-proxy/config.Version=$(VERSION) -w -s
13-
TAG ?= "v0.3.11"
13+
TAG ?= "v0.3.12"
1414
GOOS ?= $(if $(TARGETOS),$(TARGETOS),linux)
1515
GOARCH ?= $(if $(TARGETARCH),$(TARGETARCH),amd64)
1616
GOARM ?= $(TARGETVARIANT)

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,19 @@ As not every Kafka release adds new messages/versions which are relevant to the
4040
| 0.2.9 | to 2.8.0 |
4141
| 0.3.1 | to 3.4.0 |
4242
| 0.3.11 | to 3.7.0 |
43+
| 0.3.12 | to 3.9.0 |
4344

4445
### Install binary release
4546

4647
1. Download the latest release
4748

4849
Linux
4950

50-
curl -Ls https://github.com/grepplabs/kafka-proxy/releases/download/v0.3.11/kafka-proxy-v0.3.11-linux-amd64.tar.gz | tar xz
51+
curl -Ls https://github.com/grepplabs/kafka-proxy/releases/download/v0.3.12/kafka-proxy-v0.3.12-linux-amd64.tar.gz | tar xz
5152

5253
macOS
5354

54-
curl -Ls https://github.com/grepplabs/kafka-proxy/releases/download/v0.3.11/kafka-proxy-v0.3.11-darwin-amd64.tar.gz | tar xz
55+
curl -Ls https://github.com/grepplabs/kafka-proxy/releases/download/v0.3.12/kafka-proxy-v0.3.12-darwin-amd64.tar.gz | tar xz
5556

5657
2. Move the binary in to your PATH.
5758

@@ -69,7 +70,7 @@ Docker images are available on [Docker Hub](https://hub.docker.com/r/grepplabs/k
6970
7071
You can launch a kafka-proxy container for trying it out with
7172
72-
docker run --rm -p 30001-30003:30001-30003 grepplabs/kafka-proxy:0.3.11 \
73+
docker run --rm -p 30001-30003:30001-30003 grepplabs/kafka-proxy:0.3.12 \
7374
server \
7475
--bootstrap-server-mapping "localhost:19092,0.0.0.0:30001" \
7576
--bootstrap-server-mapping "localhost:29092,0.0.0.0:30002" \
@@ -88,7 +89,7 @@ Docker images with precompiled plugins located in `/opt/kafka-proxy/bin/` are ta
8889
8990
You can launch a kafka-proxy container with auth-ldap plugin for trying it out with
9091
91-
docker run --rm -p 30001-30003:30001-30003 grepplabs/kafka-proxy:0.3.11-all \
92+
docker run --rm -p 30001-30003:30001-30003 grepplabs/kafka-proxy:0.3.12-all \
9293
server \
9394
--bootstrap-server-mapping "localhost:19092,0.0.0.0:30001" \
9495
--bootstrap-server-mapping "localhost:29092,0.0.0.0:30002" \

cmd/plugin-auth-ldap/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/hashicorp/go-plugin"
1212
"github.com/pkg/errors"
1313
"github.com/sirupsen/logrus"
14-
"io/ioutil"
1514
"net"
1615
"net/url"
1716
"os"
@@ -317,7 +316,7 @@ func getTlsConfig(caCertFile string, insecureSkipVerify bool) (*tls.Config, erro
317316
if caCertFile == "" {
318317
return &tls.Config{InsecureSkipVerify: insecureSkipVerify}, nil
319318
} else {
320-
certData, err := ioutil.ReadFile(caCertFile)
319+
certData, err := os.ReadFile(caCertFile)
321320
if err != nil {
322321
return nil, errors.Wrapf(err, "reading certificate file %s", caCertFile)
323322
}

config/jaas.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package config
33
import (
44
"errors"
55
"fmt"
6-
"io/ioutil"
6+
"os"
77
"regexp"
88
"strings"
99
)
@@ -19,7 +19,7 @@ type JaasCredentials struct {
1919
}
2020

2121
func NewJaasCredentialFromFile(filename string) (*JaasCredentials, error) {
22-
bytes, err := ioutil.ReadFile(filename)
22+
bytes, err := os.ReadFile(filename)
2323
if err != nil {
2424
return nil, err
2525
}

config/jaas_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package config
22

33
import (
4-
"github.com/stretchr/testify/assert"
5-
"io/ioutil"
64
"os"
75
"testing"
6+
7+
"github.com/stretchr/testify/assert"
88
)
99

1010
func TestExtractsJaasCredentials(t *testing.T) {
@@ -30,7 +30,7 @@ func TestExtractsJaasCredentialsFromFile(t *testing.T) {
3030
password="veyaiThai5que0ieb5le";
3131
};
3232
`
33-
tmpFile, err := ioutil.TempFile("", "kafka-proxy-jaas-test")
33+
tmpFile, err := os.CreateTemp("", "kafka-proxy-jaas-test")
3434
assert.Nil(t, err)
3535
defer os.Remove(tmpFile.Name())
3636
defer tmpFile.Close()

pkg/libs/googleid/certs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"encoding/json"
88
"fmt"
99
"golang.org/x/net/context/ctxhttp"
10-
"io/ioutil"
10+
"io"
1111
"math/big"
1212
"net/http"
1313
"time"
@@ -59,7 +59,7 @@ func GetCerts(ctx context.Context) (*Certs, error) {
5959
}
6060
defer resp.Body.Close()
6161

62-
body, err := ioutil.ReadAll(resp.Body)
62+
body, err := io.ReadAll(resp.Body)
6363
if err != nil {
6464
return nil, err
6565
}

pkg/libs/googleid/service_account.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ import (
1212
"golang.org/x/oauth2/google"
1313
"golang.org/x/oauth2/jws"
1414
"google.golang.org/api/oauth2/v2"
15-
"io/ioutil"
15+
"io"
1616
"net/http"
1717
"net/url"
18+
"os"
1819
"strings"
1920
"time"
2021
)
@@ -32,7 +33,7 @@ type ServiceAccountTokenSource struct {
3233
}
3334

3435
func NewServiceAccountTokenSource(credentialsFile string, targetAudience string) (*ServiceAccountTokenSource, error) {
35-
data, err := ioutil.ReadFile(credentialsFile)
36+
data, err := os.ReadFile(credentialsFile)
3637
if err != nil {
3738
return nil, err
3839
}
@@ -130,7 +131,7 @@ func doExchange(ctx context.Context, token string) ([]byte, error) {
130131
}
131132
defer resp.Body.Close()
132133

133-
body, err := ioutil.ReadAll(resp.Body)
134+
body, err := io.ReadAll(resp.Body)
134135
if err != nil {
135136
return nil, err
136137
}

pkg/libs/oidc-provider/plugin.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"encoding/json"
66
"fmt"
7-
"io/ioutil"
87
"os"
98
"sync"
109
"time"
@@ -210,7 +209,7 @@ func getTokenResponse(token string, status int) (apis.TokenResponse, error) {
210209
}
211210

212211
func getTokenSource(credentialsFilePath string, targetAud string) (idTokenSource, error) {
213-
data, err := ioutil.ReadFile(credentialsFilePath)
212+
data, err := os.ReadFile(credentialsFilePath)
214213

215214
if err != nil {
216215
return nil, err

0 commit comments

Comments
 (0)