File tree Expand file tree Collapse file tree 3 files changed +26
-5
lines changed Expand file tree Collapse file tree 3 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 1
- FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.19 AS builder
1
+ FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.21 AS builder
2
2
RUN apk add alpine-sdk ca-certificates
3
3
4
4
ARG TARGETOS
@@ -21,7 +21,7 @@ RUN mkdir -p build && \
21
21
go build -mod=vendor -o build/kafka-proxy \
22
22
-ldflags "${LDFLAGS}" .
23
23
24
- FROM --platform=$BUILDPLATFORM alpine:3.19
24
+ FROM --platform=$BUILDPLATFORM alpine:3.21
25
25
RUN apk add --no-cache ca-certificates libcap
26
26
RUN adduser \
27
27
--disabled-password \
Original file line number Diff line number Diff line change 1
- FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.19 AS builder
1
+ FROM --platform=$BUILDPLATFORM golang:1.22-alpine3.21 AS builder
2
2
RUN apk add alpine-sdk ca-certificates
3
3
4
4
ARG TARGETOS
@@ -27,7 +27,7 @@ RUN mkdir -p build && \
27
27
go build -mod=vendor -o build/unsecured-jwt-provider -ldflags "${LDFLAGS}" cmd/plugin-unsecured-jwt-provider/main.go && \
28
28
go build -mod=vendor -o build/oidc-provider -ldflags "${LDFLAGS}" cmd/plugin-oidc-provider/main.go
29
29
30
- FROM --platform=$BUILDPLATFORM alpine:3.19
30
+ FROM --platform=$BUILDPLATFORM alpine:3.21
31
31
RUN apk add --no-cache ca-certificates libcap
32
32
RUN adduser \
33
33
--disabled-password \
@@ -50,4 +50,3 @@ RUN setcap 'cap_net_bind_service=+ep' /opt/kafka-proxy/bin/kafka-proxy && \
50
50
USER kafka-proxy
51
51
ENTRYPOINT ["/opt/kafka-proxy/bin/kafka-proxy"]
52
52
CMD ["--help"]
53
-
Original file line number Diff line number Diff line change @@ -496,6 +496,17 @@ spec:
496
496
ports:
497
497
- name: metrics
498
498
containerPort: 9080
499
+ securityContext:
500
+ runAsNonRoot: true
501
+ runAsUser: 65534
502
+ allowPrivilegeEscalation: false
503
+ capabilities:
504
+ drop:
505
+ - ALL
506
+ add:
507
+ - NET_BIND_SERVICE
508
+ seccompProfile:
509
+ type: RuntimeDefault
499
510
livenessProbe:
500
511
httpGet:
501
512
path: /health
@@ -591,6 +602,17 @@ spec:
591
602
mountPath : " /var/run/secret/kafka-client-certificate"
592
603
- name : " tls-client-key-file"
593
604
mountPath : " /var/run/secret/kafka-client-key"
605
+ securityContext :
606
+ runAsNonRoot : true
607
+ runAsUser : 65534
608
+ allowPrivilegeEscalation : false
609
+ capabilities :
610
+ drop :
611
+ - ALL
612
+ add :
613
+ - NET_BIND_SERVICE
614
+ seccompProfile :
615
+ type : RuntimeDefault
594
616
ports :
595
617
- name : metrics
596
618
containerPort : 9080
You can’t perform that action at this time.
0 commit comments