Skip to content

Commit c9513c6

Browse files
Fix PSS restricted warnings (#2528)
* fix pss warnings Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com> * fix mysql Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com> --------- Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
1 parent dd4acfc commit c9513c6

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

manifests/v1beta1/components/controller/controller.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ spec:
5858
name: katib-config
5959
subPath: katib-config.yaml
6060
readOnly: true
61+
securityContext:
62+
runAsNonRoot: true
63+
allowPrivilegeEscalation: false
64+
runAsUser: 1000
65+
seccompProfile:
66+
type: RuntimeDefault
67+
capabilities:
68+
drop:
69+
- ALL
6170
volumes:
6271
- name: cert
6372
secret:

manifests/v1beta1/components/db-manager/db-manager.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,12 @@ spec:
4040
initialDelaySeconds: 10
4141
periodSeconds: 60
4242
failureThreshold: 5
43+
securityContext:
44+
runAsNonRoot: true
45+
allowPrivilegeEscalation: false
46+
runAsUser: 1000
47+
seccompProfile:
48+
type: RuntimeDefault
49+
capabilities:
50+
drop:
51+
- ALL

manifests/v1beta1/components/mysql/mysql.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ spec:
2020
annotations:
2121
sidecar.istio.io/inject: "false"
2222
spec:
23+
securityContext:
24+
fsGroup: 999
25+
fsGroupChangePolicy: OnRootMismatch
2326
containers:
2427
- name: katib-mysql
2528
image: mysql:8.0.29
@@ -68,6 +71,16 @@ spec:
6871
volumeMounts:
6972
- name: katib-mysql
7073
mountPath: /var/lib/mysql
74+
securityContext:
75+
allowPrivilegeEscalation: false
76+
seccompProfile:
77+
type: RuntimeDefault
78+
runAsNonRoot: true
79+
runAsUser: 999
80+
runAsGroup: 999
81+
capabilities:
82+
drop:
83+
- ALL
7184
volumes:
7285
- name: katib-mysql
7386
persistentVolumeClaim:

manifests/v1beta1/components/ui/ui.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,13 @@ spec:
3333
ports:
3434
- name: ui
3535
containerPort: 8080
36+
securityContext:
37+
runAsNonRoot: true
38+
allowPrivilegeEscalation: false
39+
runAsUser: 1000
40+
seccompProfile:
41+
type: RuntimeDefault
42+
capabilities:
43+
drop:
44+
- ALL
3645
serviceAccountName: katib-ui

0 commit comments

Comments
 (0)