File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,10 @@ operator:
48
48
49
49
# SecurityContext is security config of this component, it will set template.spec.securityContext
50
50
# Refer to https://kubernetes.io/docs/tasks/configure-pod-container/security-context
51
- securityContext : {}
52
- # runAsUser: 1000
53
- # runAsGroup: 2000
51
+ securityContext :
52
+ runAsNonRoot : true
53
+ runAsUser : 1000
54
+ runAsGroup : 2000
54
55
# fsGroup: 2000
55
56
56
57
# PodAnnotations will set template.metadata.annotations
Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ FROM --platform=$TARGETPLATFORM ghcr.io/pingcap-qe/bases/pingcap-base:v1.10.0@sh
29
29
30
30
ARG TARGETPLATFORM
31
31
32
- USER pingcap:pingcap
32
+ # Use numeric UID:GID instead of username for Kubernetes compatibility.
33
+ # Base image defines: PINGCAP_UID=1000, PINGCAP_GID=2000 (pingcap:pingcap)
34
+ # Kubernetes runAsNonRoot requires numeric user to verify non-root execution.
35
+ # Reference: https://github.com/PingCAP-QE/artifacts/blob/main/dockerfiles/bases/pingcap-base/Dockerfile
36
+ USER 1000:2000
33
37
34
38
WORKDIR /
35
39
@@ -41,7 +45,7 @@ FROM --platform=$TARGETPLATFORM ghcr.io/pingcap-qe/bases/pingcap-base:v1.10.0@sh
41
45
42
46
ARG TARGETPLATFORM
43
47
44
- USER pingcap:pingcap
48
+ USER 1000:2000
45
49
46
50
WORKDIR /
47
51
@@ -53,7 +57,7 @@ FROM --platform=$TARGETPLATFORM ghcr.io/pingcap-qe/bases/pingcap-base:v1.10.0@sh
53
57
54
58
ARG TARGETPLATFORM
55
59
56
- USER pingcap:pingcap
60
+ USER 1000:2000
57
61
58
62
WORKDIR /
59
63
@@ -67,7 +71,7 @@ FROM --platform=$TARGETPLATFORM ghcr.io/pingcap-qe/bases/pingcap-base:v1.10.0@sh
67
71
68
72
ARG TARGETPLATFORM
69
73
70
- USER pingcap:pingcap
74
+ USER 1000:2000
71
75
72
76
WORKDIR /
73
77
You can’t perform that action at this time.
0 commit comments