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
22RUN apk add alpine-sdk ca-certificates
33
44ARG TARGETOS
@@ -21,7 +21,7 @@ RUN mkdir -p build && \
2121 go build -mod=vendor -o build/kafka-proxy \
2222 -ldflags "${LDFLAGS}" .
2323
24- FROM --platform=$BUILDPLATFORM alpine:3.19
24+ FROM --platform=$BUILDPLATFORM alpine:3.21
2525RUN apk add --no-cache ca-certificates libcap
2626RUN adduser \
2727 --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
22RUN apk add alpine-sdk ca-certificates
33
44ARG TARGETOS
@@ -27,7 +27,7 @@ RUN mkdir -p build && \
2727 go build -mod=vendor -o build/unsecured-jwt-provider -ldflags "${LDFLAGS}" cmd/plugin-unsecured-jwt-provider/main.go && \
2828 go build -mod=vendor -o build/oidc-provider -ldflags "${LDFLAGS}" cmd/plugin-oidc-provider/main.go
2929
30- FROM --platform=$BUILDPLATFORM alpine:3.19
30+ FROM --platform=$BUILDPLATFORM alpine:3.21
3131RUN apk add --no-cache ca-certificates libcap
3232RUN adduser \
3333 --disabled-password \
@@ -50,4 +50,3 @@ RUN setcap 'cap_net_bind_service=+ep' /opt/kafka-proxy/bin/kafka-proxy && \
5050USER kafka-proxy
5151ENTRYPOINT ["/opt/kafka-proxy/bin/kafka-proxy"]
5252CMD ["--help"]
53-
Original file line number Diff line number Diff line change @@ -496,6 +496,17 @@ spec:
496496 ports:
497497 - name: metrics
498498 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
499510 livenessProbe:
500511 httpGet:
501512 path: /health
@@ -591,6 +602,17 @@ spec:
591602 mountPath : " /var/run/secret/kafka-client-certificate"
592603 - name : " tls-client-key-file"
593604 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
594616 ports :
595617 - name : metrics
596618 containerPort : 9080
You can’t perform that action at this time.
0 commit comments